Dim aList as New List(Of String)
aList.Add("Hello, World")
aList.Add("Test")
Dim output As String = aList(0)
output
:
Hello, World
If you do not know the index of the item or only know part of the string then use the Find or FindAll method
Dim aList as New List(Of String)
aList.Add("Hello, World")
aList.Add("Test")
Dim output As String = aList.Find(Function(x) x.StartWith("Hello"))
output
:
Hello, World
The FindAll method returns a new List (of String)
Dim aList as New List(Of String)
aList.Add("Hello, Test")
aList.Add("Hello, World")
aList.Add("Test")
Dim output As String = aList.FindAll(Function(x) x.Contains("Test"))
output(0) = "Hello, Test"
output(1) = "Test"