VB.Net Tutorial/Statements/GoTo — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 15:53, 26 мая 2010
GoTo statement with Label
<source lang="vbnet">Option Strict On
Imports System Module Module1 Sub Main( ) Dim counterVariable As Integer = 0 repeat: Console.WriteLine("counterVariable: {0}", counterVariable) counterVariable += 1 If counterVariable < 10 Then GoTo repeat End If End Sub End Module</source>
counterVariable: 0 counterVariable: 1 counterVariable: 2 counterVariable: 3 counterVariable: 4 counterVariable: 5 counterVariable: 6 counterVariable: 7 counterVariable: 8 counterVariable: 9