把一个数组的值赋给另一个数组(VB.NET)
传址:
传值:
Dim arr1() As Object = {"string1", "string2", "string3"}
Dim arr2() As Object = arr1
Dim arr2() As Object = arr1
传值:
Dim arr1() As Object = {"string1", "string2", "string3"}
Dim arr2() As Object
ReDim arr2(arr1.Length-1)
Array.Copy(arr1, arr2, arr1.Length)
Dim arr2() As Object
ReDim arr2(arr1.Length-1)
Array.Copy(arr1, arr2, arr1.Length)