Equivalent VB keyword for 'break' *

Question

I just moved over to the Visual Basic team here at work.

What is the equivalent keyword to break in Visual Basic, that is, to exit a loop early but not the method?

Answer

In both Visual Basic 6.0 and VB.NET you would use:

Exit For 

or

Exit While 

or

Exit Do

... depending on the loop type.

< br > via < a class="StackLink" href=" http://stackoverflow.com/questions/5759/" > Equivalent VB keyword for 'break'< /a>
Share on Google Plus

About Cinema Guy

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment