Public Class SamplesArray
Public Shared Sub Main()
Dim myIntArray() As Integer = {1, 2, 3, 4, 5}
Dim myObjArray() As Object = {26, 27, 28, 29, 30}
PrintValues(myIntArray)
PrintValues(myObjArray)
System.Array.Copy(myIntArray, myObjArray, 2)
PrintValues(myIntArray)
PrintValues(myObjArray)
End Sub
Overloads Public Shared Sub PrintValues(myArr() As Object)
Dim i As Object
For Each i In myArr
Console.Write(ControlChars.Tab + "{0}", i)
Next i
Console.WriteLine()
End Sub
Overloads Public Shared Sub PrintValues(myArr() As Integer)
Dim i As Integer
For Each i In myArr
Console.Write(ControlChars.Tab + "{0}", i)
Next i
Console.WriteLine()
End Sub
End Class