Mothra Posted March 1, 2004 Posted March 1, 2004 Does C# have an equalivant to VB's Exit Function(or Sub, or whatever)? Quote Being smarter than you look is always better than looking smarter than you are.
Mothra Posted March 2, 2004 Author Posted March 2, 2004 right on. Thanks! Quote Being smarter than you look is always better than looking smarter than you are.
Rimmel Posted March 14, 2004 Posted March 14, 2004 right on. Thanks! You can use "return" in VB.net as well...... Quote
Denaes Posted March 14, 2004 Posted March 14, 2004 You can use "return" in VB.net as well...... Oh, so return exits a procedure/function? VB has Exit.Sub, Exit.Loop, Exit.If Does return do all of that? Just exit you out of your nearest clause? Quote
*Experts* Volte Posted March 14, 2004 *Experts* Posted March 14, 2004 Return will leave the function and return the value (if one is specified), regardless of whether it's inside a loop or not. Quote
Hamburger1984 Posted March 14, 2004 Posted March 14, 2004 Oh, so return exits a procedure/function? VB has Exit.Sub, Exit.Loop, Exit.If Does return do all of that? Just exit you out of your nearest clause? If you'd like to exit only a Loop then you can use "break" (at least in C# - don't know whether it also works in VB.NET)... the program contiues to run in the same procedure/function but after the Loop you where just in.. Quote
iebidan Posted March 17, 2004 Posted March 17, 2004 hum I think in VB to exit a loop is "Exit For" I don't know either if the break statement will work there, the return statement will work as an "Exit Sub" or "Exit Function" Quote Fat kids are harder to kidnap
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.