public static class EmptyOrNullHelper
public static string EmptyOrNull(this HtmlHelper helper,IQueryable(T) type)
{
//Code
}
}
最佳答案
像这样:
public static class EmptyOrNullHelper
{
public static string EmptyOrNull<T>(this HtmlHelper helper,IQueryable<T> type)
{
//Code
}
}
换句话说,在其参数之一中为要使用的方法指定通用参数.您无需在通常在声明中调用方法的地方执行此操作.