Consider i execute a method \'Method1\' in C#. Once the execution goes into the method i check few condition and if any of them is false, then the execution of Method1 shou
Are you talking about multi threading?
or something like
int method1(int inputvalue)
{
/* checking conditions */
if(inputvalue < 20)
{
//This moves the execution back to the calling function
return 0;
}
if(inputvalue > 100)
{
//This 'throws' an error, which could stop execution in the calling function.
throw new ArgumentOutOfRangeException();
}
//otherwise, continue executing in method1
/* ... do stuff ... */
return returnValue;
}