Created
February 8, 2019 21:31
-
-
Save AnthonyDGreen/d8a64dd2af8dec46332825a445567c9d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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