For Each 変数名 In ループ対象変数名またはコレクション
...(処理)
Next
For Each 変数名 As 型名 In ループ対象変数名またはコレクション
...(処理)
Next
Private Sub Button6_Click(sender As System.Object, e As System.EventArgs) Handles Button6.Click
Dim a(5) As Integer
a(0) = 1
a(1) = 2
a(2) = 3
a(3) = 4
a(4) = 5
a(5) = 10
For Each p As Integer In a
TextBox1.Text += p.ToString() + " "
Next
End Sub