I figured out how to do this with a list, here is the code I found:
Public Class ContactInfo
Public ClientName as String
Public ClientNumber as String
End Class
ContactNumbers = New List(Of ContactInfo)() From {
New ContactInfo with {.ClientName = "Test1", .ClientNumber = "123-456-7890"},
New ContactInfo with {.ClientName = "Test2", .ClientNumber = "234-567-8901"}
}
But I wanted a key as well, so a dictionary or sortedlist, how would I do this?
ContactNumbers = New SortedList(Of Integer, ContactInfo)() From {
New ??
}
Public Class ContactInfo
Public ClientName as String
Public ClientNumber as String
End Class
ContactNumbers = New List(Of ContactInfo)() From {
New ContactInfo with {.ClientName = "Test1", .ClientNumber = "123-456-7890"},
New ContactInfo with {.ClientName = "Test2", .ClientNumber = "234-567-8901"}
}
But I wanted a key as well, so a dictionary or sortedlist, how would I do this?
ContactNumbers = New SortedList(Of Integer, ContactInfo)() From {
New ??
}
Last edited: