16,721
社区成员




' 创建 String数组
Dim winterMonths = {"December", "January", "February"}
' 创建 Integer 数组
Dim numbers = {1, 2, 3, 4, 5}
' 创建菜单选项列表,需要List(Of MenuOption)的一个扩展方法 Add
Dim menuOptions = New List(Of MenuOption) From {{1, "Home"},
{2, "Products"},
{3, "News"},
{4, "Contact Us"}}
参考:http://www.cnblogs.com/feixian49/archive/2011/05/18/1738747.html' Variable product is an instance of a simple anonymous type.
Dim product = New With {Key .Name = "paperclips", .Price = 1.29}