close
VB.NET 2003 無continue =.=
可用以下方式
Dim sum As Integer, i As Integer
For i = 1 To 100
If (i Mod 2 <> 0) Then
GoTo continue
End If
sum = sum + i
continue:
Next
另外在VB.NET 2005,已經實現了continue語法
For i As Integer = 0 To 100
' If i = 50 skip Console.Writeline statement
If i = 50 Then Continue For
Console.WriteLine(i.ToString)
Next
全站熱搜
留言列表