stop looping

How to stop loopin in vb.net
[28 byte] By [thefalcon] at [2007-12-23]
# 1

Hi falcon,

I hope you asked how to skip from a loop. if so here are 2 examples.

Example 1:-

Dim i As Integer = 0

For i = 0 To 10

If i = 5 Then

Exit For

End If

Next

Example 2:-

Do Until i = 10

If i = 5 Then

Exit Do

End If

i += 1

Loop

NalakaHewage at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic Language...