我不知道它是否可能,但我想这样做:我想返回一个响应,但在执行函数之前,无需等待方法响应......
int Validate(saveobj obje)
{
// here I do my validations
return 0;
}
public string sendingObj(saveobj obje)
{
//here I call my validation function
int result = Validate(obje);
if(result != 0)
// here I want to return ALLAYS something, because my web site cant wait all the process
return result;
}
// here, no matter which response I give on my validate method I want to do this
// Rest OF MY SENDING CODE !