□投稿者/ aiti (2回)-(2019/10/18(Fri) 10:30:44)
|
分類:[.NET 全般]
同じ処理が何度も続くので短くまとめたいのですが、やり方がわかりません。 Select Case Cursor Case 1 If table(0, 0) = " " Then table(0, 0) = Mark LoopCount1 += 1 End If Case 2 If table(0, 1) = " " Then table(0, 1) = Mark LoopCount1 += 1 End If Case 3 If table(0, 2) = " " Then table(0, 2) = Mark LoopCount1 += 1 End If Case 4 If table(1, 0) = " " Then table(1, 0) = Mark LoopCount1 += 1 End If Case 5 If table(1, 1) = " " Then table(1, 1) = Mark LoopCount1 += 1 End If Case 6 If table(1, 2) = " " Then table(1, 2) = Mark LoopCount1 += 1 End If Case 7 If table(2, 0) = " " Then table(2, 0) = Mark LoopCount1 += 1 End If Case 8 If table(2, 1) = " " Then table(2, 1) = Mark LoopCount1 += 1 End If Case 9 If table(2, 2) = " " Then table(2, 2) = Mark LoopCount1 += 1 End If End Select
|
|