Skip to content

Instantly share code, notes, and snippets.

@AnthonyDGreen
Created February 8, 2019 21:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save AnthonyDGreen/d8a64dd2af8dec46332825a445567c9d to your computer and use it in GitHub Desktop.
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
<Runtime.CompilerServices.Extension>
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