将以下For Next循环转换为For Each循环:
Dim TeamString(31) As String
For CounterInteger as Integer = 0 to 31
MessageBox.Show("Team Name:" & TeamString(CounterInteger))
Next
答案 0 :(得分:2)
你的评论开头不错,但你的数组中的是字符串而不是整数,所以你会遍历字符串。
Dim TeamString(31) As String
For Each Team As String In TeamString
MessageBox.Show("Team Name:" & Team)
Next