Imports System
Public Class MainClass
Shared Sub Main(ByVal args As String())
Dim counter As Integer
For counter = 1 To 10
' skip remaining code in loop only if counter = 3
If counter = 3 Then
Exit For
End If
Next
Console.WriteLine("counter = " & counter & _
" after exiting For/Next structure" & vbCrLf)
End Sub
End Class
|