Dear Friends ,
I have a nested loop of Do Loop in vb.Net
Like
Do
Do
'Contunue Do 'Main Loop
Loop
Loop
In Do Loop i want to go to next record from main do loop any one can tell me about this please avoid GoTo Statement
Loading

VulpesPosted Jun 28, 2012, 4:23 AM
Dim continueMain As Boolean = False;
Do
Do
continueMain = True
Exit Do
Loop
If continueMain Then Exit Do
Loop
or this is perhaps a bit more elegant:
Do
While True
Exit Do
End While
Loop
Jignesh TrivediPosted Jun 28, 2012, 3:29 AM
Try with Exit While or Exit Do.
please refer
http://msdn.microsoft.com/en-us/library/t2at9t47%28v=vs.80%29.aspx
http://msdn.microsoft.com/en-us/library/zh1f56zs.aspx
Dim number As Integer = 8
Do Until number = 10
If number <= 0 Then Exit Do
number -= 1
counter += 1
Loop
hope this will help you.