Solved

while loop vb.net

Posted on 2004-09-09
10
1,005 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

710 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