List(T).CopyTo Method copies a range of elements from the List(Of T) to one-dimensional array
Imports System
Imports System.Collections.Generic
Public Class Example
Public Shared Sub Main()
Dim numbers As New List(Of String)
numbers.Add("One")
numbers.Add("Two")
numbers.Add("Three")
numbers.Add("One")
numbers.Add("Five")
Console.WriteLine()
For Each num As String In numbers
Console.WriteLine(num)
Next
Dim array(14) As String
numbers.CopyTo(array)
numbers.CopyTo(array, 6)
numbers.CopyTo(2, array, 12, 3)
Console.WriteLine(vbLf & "Contents of the array:")
For Each num As String In array
Console.WriteLine(num)
Next
End Sub
End Class