Solved

while loop vb.net

Posted on 2004-09-09
10
995 Views
Last Modified: 2008-02-01
how to break out of while loop in vb.net

break is not working

thanks


0
Comment
Question by:sandeep437
10 Comments
 
LVL 3

Expert Comment

by:tomv011397
ID: 12020126
exit ... (while, for, sub, etc)

Tom
0
 
LVL 7

Accepted Solution

by:
Joe_Griffith earned 125 total points
ID: 12020388
Do While x=10
  Exit Do
Loop
0
 
LVL 4

Expert Comment

by:Javert93
ID: 12021642
VB doesn't support break or continue like C# or C++ does. You can only exit the loop using the Exit [While|Do] command.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 3

Expert Comment

by:tomv011397
ID: 12021694
Break is used in select Case statements

Tom
0
 
LVL 14

Expert Comment

by:ptakja
ID: 12023115
Tom,

Break is not a VB.Net keyword.  VB.Net Select Case statements run until the next Case is encountered at which point execution drops to the End Select statement.

Break is used in C# and C++ to exit a Case statement.
0
 

Expert Comment

by:Ilianam
ID: 12030503
exit
0
 
LVL 2

Expert Comment

by:ahmadfuwad
ID: 12082711
use   'Exit While'  for terminating the while loop
'break' does not work in loop
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now