Mega Code Archive

 
Categories / VB.Net / Data Structure
 

Add another list to the current list

Imports System Imports System.Collections.Generic Public Class Example     Public Shared Sub Main()         Dim input() As String = { "One","Two","Three" }         Dim numbers As New List(Of String)(input)         Console.WriteLine(vbLf & "Capacity: {0}", numbers.Capacity)         For Each num As String In numbers             Console.WriteLine(num)         Next         numbers.AddRange(numbers)     End Sub End Class