VB.Net/Language Basics/While
Версия от 16:40, 26 мая 2010;  (обсуждение)
Exit from While Loop
Imports System
Public Class MainClass
    Shared Sub Main(ByVal args As String())
      Dim counter As Integer
      While counter <= 10
         " skip remaining code in loop only if counter = 7
         If counter = 7 Then
            Exit While
         End If
         counter += 1
      End While
      Console.WriteLine( "counter = " & counter & _
         " after exiting While structure")
    End Sub
End Class