VB中匿名类型的语法是什么?(What is the syntax for an Anonymous type in VB?)
我想设置htmlAttribute属性,但我不能找出正确的语法
这里是它是如何工作在C#
<%=Html.Password("myPassword", 50,"",new { style = "width:100px" })%><br />什么是vb.net版本
new { style = "width:100px" }?
i am trying to set the htmlAttribute property but i cant figure out the correct syntax
here is how it works in c#
<%=Html.Password("myPassword", 50,"",new { style = "width:100px" })%><br />what would be the vb.net version of
new { style = "width:100px" }?
最满意答案
VB中内联匿名类型的正确语法是:
New With { .Style = "width:100px" }如果你想声明一个匿名类型,使用下面的语法:
Dim myVariable = New With { .Style = "width:100px" }The correct syntax for an inline anonymous type in VB is:
New With { .Style = "width:100px" }If you want to declare an anonymous type use this syntax:
Dim myVariable = New With { .Style = "width:100px" }更多推荐
发布评论