469,920 Members | 2,492 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

"break" statament in vb.net?

hi, i'd like to do something like

while(x)
if(y) break
...
end while

what is the equivalent of java's break statement in vb.net? i don't
want to use a goto :)

Nov 21 '05 #1
5 52978
<th****@gmail.com> schrieb:
hi, i'd like to do something like

while(x)
if(y) break
...
end while

what is the equivalent of java's break statement in vb.net?


'Exit While'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #2
Exit While for when you are in a while loop. Exit For when you are in a for
loop.

There is no equivalent to 'continue', unfortunately.

<th****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
hi, i'd like to do something like

while(x)
if(y) break
...
end while

what is the equivalent of java's break statement in vb.net? i don't
want to use a goto :)

Nov 21 '05 #3
Try "Exit While".

You can exit any loop using "Exit".

Paul

<th****@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
hi, i'd like to do something like

while(x)
if(y) break
...
end while

what is the equivalent of java's break statement in vb.net? i don't
want to use a goto :)

Nov 21 '05 #4
thanks for all of your help!

Nov 21 '05 #5
But continue will be available in VB.2005

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

43 posts views Thread by steve | last post: by
23 posts views Thread by Invalid User | last post: by
27 posts views Thread by Ron Adam | last post: by
6 posts views Thread by Fao | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.