Dim aList as New List(Of Integer)
aList.Add(1)
aList.Add(10)
aList.Add(1001)
To add more than one item at a time use AddRange. Always adds to the end of the list
Dim blist as New List(of Integer)
blist.AddRange(alist)
Dim aList as New List(of String)
alist.AddRange({"one", "two", "three"})
In order to add items to the middle of the list use Insert
Insert will place the item at the index, and renumber the remaining items
Dim aList as New List(Of String)
aList.Add("one")
aList.Add("three")
alist(0) = "one"
alist(1) = "three"
alist.Insert(1,"two")
New Output:
alist(0) = "one"
alist(1) = "two"
alist(2) = "three"