VB.NET 繰り返し文For/For Each/Do/While構文
2011/09/28 15:24Update
VB.NET の繰り返し文For/For Each/Do/Whileの構文について
■For ~ Next 構文
■For ~ Step ~ Next 構文
■ForEach ~ Next 構文
■Do ~ Loop 構文
■Do ~ Until ~ Loop 構文
■Do ~ Loop Until構文
■Do ~ While 構文
■While ~ End While構文
.
For i = 0 To 9 '0, 1, 2, …, 8, 9 'Exit For 'Forループから脱出 'Continue For '飛ばして、次の周処理を続行 Next i
■For ~ Step ~ Next 構文
For i = 0 To 10 Step 2 '0, 2, 4, 6, 8, 10 Next i
■ForEach ~ Next 構文
For Each item As Object In items Next
■Do ~ Loop 構文
Do If boolean-expression Then Exit Do 'Continue Do End Loop
■Do ~ Until ~ Loop 構文
Do Until i > 100 i = i + 1 Loop
■Do ~ Loop Until構文
Do i = i + 1 Loop Until i > 100
■Do ~ While 構文
Do While i < 100 i = i + 1 'Exit While 'Continue While Loop
■While ~ End While構文
Dim i As Integer = 0 While i < 20 i += 1 'Exit While End While
.
Sponsored Link
Comments
- Relative Articles
- TopMostプロパティ - フォームを常に手前にする - (2009/11/06 15:15)
- VB.NET メール送信例 - (2011/08/31 13:34)
- VB.NETの異常処理 - Try ~ Catch ~ 構文 例 - (2011/08/10 15:07)
- VB.NETのHTTPダウンロード例 - (2011/08/10 15:23)
- VB.NETでのインスタンスについて - (2011/08/10 16:16)
- VB.NETの名前空間定義 - (2011/08/10 16:57)
- VB.NET クラスの定義 - (2011/08/10 17:47)
- VB.NET インタフェースの定義とその使用例 - (2011/08/11 11:35)
- VB.NET クラスのコンストラクタ - (2011/08/11 11:55)
- VB.NET getter/setterメソッドの定義方法 - (2011/08/11 16:46)