Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Class Contact
Property Name As String
Property FavoriteFood As String
End Class
Module Program
Sub Main()
Dim contacts = New List(Of Contact) From {
{"Leo", "Chocolate"},
{"Donnie", "Bananas"},
{"Raph", "The Blood of his Enemies"},
{"Mikey", "Pizza"}
End Sub
Sub Add(collection As ICollection(Of Contact), name As String, favoriteFood As String)
collection.Add(New Contact With {.Name = name, .FavoriteFood = favoriteFood})
End Sub
End Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment