How to assign one array to another array in VB.NET

1 Answer

0 votes
Imports System

Public Class Test
    Public Shared Sub Main()
        Dim arr() As Integer = {7, 4, 2, 9, 1, 5, 8}
        Dim arr2() As Integer = arr

        For i As Integer = 0 To UBound(arr2)
            Console.Write("{0} ", arr2(i))
        Next

    End Sub
End Class



' run
' 
' 7 4 2 9 1 5 8 

 



answered May 1, 2019 by avibootz
...