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

1 Answer

0 votes
Imports System
Imports System.Linq

Public Class Program
	Public Shared Sub Main(ByVal args As String())
        Dim arr As Integer() = {1, 2, 3, 4, 5}
        Dim result = arr.ToArray()

        For Each n As Integer In result
            Console.Write(n & " ")
        Next
    End Sub
End Class









' run:
'
' 1 2 3 4 5
'

 



answered Dec 28, 2022 by avibootz
...