Created
May 15, 2014 01:11
-
-
Save aoisensi/570e367d258b3071a12e to your computer and use it in GitHub Desktop.
C#erのためのVBチートシート(俺々版) ref: http://qiita.com/aoisensi/items/54ef11ccf9aa5bbb9cb5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'The cake is a lie... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim 変数名 As 型名 | |
Dim 変数名A, 変数名B As 型名 '複数同時宣言 | |
Dim 変数名 As 型名 = 値 '宣言と初期化 複数同時宣言かつ初期化はできない? | |
Dim 変数名 = 値 'var |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If 条件式 Then 真単一実行文 Else 偽単一実行文 '単一行 Elseを含んだ以降は省略可 | |
If 条件式 Then '複数行 | |
実行文 | |
ElseIf 条件式 Then | |
実行文 | |
Else | |
実行文 | |
End If |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Do While 条件式 'WhileじゃなくてUntilでもいい | |
実行文 | |
Continue Do 'continue | |
Exit Do 'break | |
Loop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Do | |
実行文 | |
Loop While 条件式 'こっちもUntil使える |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For Dim カウンタ変数 = 0 To 4 '4になるまで | |
実行文 '5回処理される | |
Exit For 'break | |
Continue For 'continue | |
Next カウンタ変数 '最後の変数指定は省略可 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment