-
The following code initializes a new list of strings
myList = new list(Of String)
-
The following code initializes new list of string arrays
myList = new list(Of String())
-
The following code sets the first item of the list
myList(0) = "Hello"
-
The following code gets the sixth item of the list
mySpecialString = myList(5)
-
The following code adds "Hello" at the end of the list
Add("Hello")
-
The following code inserts "Hello" after the third item
Insert(3, "Hello")
-
The following code returns the index of the item "Hello"
myIndex = myList.IndexOf("Hello")
-
The following code checks if the list contains the item "Hello" and returns true/false
doesContain = myList.Contains("Hello")
-
The following code returns the number of items in the list
myListCount = myList.Count