这个循环结构的语法是:
For Each element [ As datatype ] In group
[ statements ]
[ Continue For ]
[ statements ]
[ Exit For ]
[ statements ]
Next [ element ]
Dim anArray() As Integer = {1, 3, 5, 7, 9} Dim arrayItem As Integer '循环显示值 For Each arrayItem In anArray Proj.MsgDebug.Add(arrayItem) Next '返回结果:1 '返回结果:3 '返回结果:5 '返回结果:7 '返回结果:9 |