Hello
You have to use Return statement. The return statement terminates execution of the method in which it appears and returns control to the calling method.
 
void Foo()
{
    return;
}
 
int Foo()
{
    return 5;
}
 
 
 
----- Original Message -----
Sent: Tuesday, September 14, 2004 1:19 PM
Subject: [Microsofts_C_Sharp] How to Exit function

Hi,
 
In VB, you would exit a sub/function by "Exit Sub" or "Exit Function", how would you exit a function in C# ??


Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to