「VB.net入門」ExitでFor Each文のサンプル
サンプルコード
Sub Main()
Dim city() As String = {"tokyo", "oosaka", "yokohama","kawasaki"}
For Each cft As String In city
If cft = "yokohama" Then
Exit For
End If
//some code
Next
End Sub
Coding Changes the World
サンプルコード
Sub Main()
Dim city() As String = {"tokyo", "oosaka", "yokohama","kawasaki"}
For Each cft As String In city
If cft = "yokohama" Then
Exit For
End If
//some code
Next
End Sub