Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1032
  • 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

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