Imports System
Public Class MainClass
Shared Sub Main(ByVal args As String())
Dim counter As Integer
Do Until counter > 10
' skip remaining code in loop only if counter = 5
If counter = 5 Then
Exit Do
End If
counter += 1
Loop
Console.WriteLine("counter = " & counter & _
" after exiting Do Until/Loop structure" & vbCrLf)
End Sub
End Class