Possible Duplicate:
Should a function have only one return statement?
Hi,
I have a code somethg like below:
int method(string a ,int b , int c){
if(cond1)
return -1;
if(cond2 || cond3)
return 3;
if(cond1 && cond2)
return 0;
else
return -999;
}
Does it perform badly when compared to having multiple if else
and have single return?
EDIT:
Thank you for all your answers.