VB.Net/Language Basics/While — различия между версиями
| Admin (обсуждение | вклад) м (1 версия) | |
| (нет различий) | |
Версия 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