code_junkie

Convert an existing type into an anonymous type and add a new property

Nov 13th, 2011
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. Public Class Person
  2. Public Name As String
  3. Public Age As Integer
  4. End Class
  5.  
  6. Dim p As New Person With {.Name = "James", .Age = 100}
  7.  
  8. Dim n = New With {.ShoeSize = 10}
Add Comment
Please, Sign In to add comment