while loop vb.net

how to break out of while loop in vb.net

break is not working

thanks


sandeep437Asked:
Who is Participating?
 
Joe_GriffithCommented:
Do While x=10
  Exit Do
Loop
0
 
tomv011397Commented:
exit ... (while, for, sub, etc)

Tom
0
 
Javert93Commented:
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

 
tomv011397Commented:
Break is used in select Case statements

Tom
0
 
ptakjaCommented:
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
 
IlianamCommented:
exit
0
 
ahmadfuwadCommented:
use   'Exit While'  for terminating the while loop
'break' does not work in loop
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.