Solved

while loop vb.net

Posted on 2004-09-09
10
1,000 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

792 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