What this means is that if the conditions are met, an earlier departure from the routine occurs, and the rest of the routine is ignored. In this example, calls to generate.email() will return a
-1 right away if the input value not a valid email address, and not go through the overhead of building objects and running their methods. While you could just put the rest of the code in an
else
wrap, you'd stilll have to go through all of the code when you are debugging.
public static class generate{
public int email(string emailAddress = "") {
if (IsValidAddress(emailAddress) == false) { return -1; }
return send.resultvalue;
}
}