In C, C++ and C# when using a condition inside a function or loop statement it\'s possible to use a continue or return statement as early as possible and g
The code would be more readable if termination criteria are handled first. I always prefer, checking for conditions that require a break or return rather than those that would need lengthy code execution. I prefer:
if (termination condn)
return;
// code
// code
to
if (success condn)
{
// code
// code
}
else
return;
This makes reading and understanding the code easier.