[英]C# to VB.Net conversion assistance
I have the the following C# code: 我有以下C#代码:
public static MvcHtmlString ExtendedDropDownListFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, IEnumerable<ExtendedSelectListItem> selectList, string optionLabel, object htmlAttributes)
{
return SelectInternal(htmlHelper, optionLabel, ExpressionHelper.GetExpressionText(expression), selectList, false /* allowMultiple */, HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes));
}
I am struggling with a VB conversion of this and was wondering if someone could assist. 我正在为此进行VB转换而苦苦挣扎,并且想知道是否有人可以提供帮助。 Specifically, the line in the function signature:
具体来说,函数签名中的行:
Expression<Func<TModel, TProperty>> expression
Thanks for any help. 谢谢你的帮助。
expression As Expression(Of Func(Of TModel, TProperty))
My bad fellow members, it was a namespace issue. 我的坏伙伴们,这是一个名称空间问题。
I just needed to add an imports: 我只需要添加一个导入:
Imports System.Linq.Expressions
I guess I should have dug in a little deeper before I asked. 我想我应该问得更深一些。 :(
:(
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.