Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
Does C# have an equalivant to VB's Exit Function(or Sub, or whatever)?
Being smarter than you look is always better than looking smarter than you are.
  • 2 weeks later...
Posted
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?

Posted
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..

Posted
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"
Fat kids are harder to kidnap

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...