[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1028
  • Last Modified:

while loop vb.net

how to break out of while loop in vb.net

break is not working

thanks


0
sandeep437
Asked:
sandeep437
1 Solution
 
tomv011397Commented:
exit ... (while, for, sub, etc)

Tom
0
 
Joe_GriffithCommented:
Do While x=10
  Exit Do
Loop
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
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

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now