ch3 規則陣列 (未分類)
'規則陣列
Module Module1
Sub Main()
Dim i(2) As Integer
Dim J As Integer() = New Integer(2) {}
Dim K As Integer() = {1, 2}
Dim COLORS() As String = {"Red", "Blue", "Green"}
printarray(i)
printarray(J)
printarray(K)
printarray(COLORS)
End Sub
Sub printarray(ByVal i As Array)
For Each s In i
Console.WriteLine(s)
Next
Console.WriteLine("----")
End Sub
End Module
如有錯誤 歡迎指正