【发布时间】:2010-06-01 10:51:16
【问题描述】:
public static class EmptyOrNullHelper
public static string EmptyOrNull(this HtmlHelper helper, IQueryable(T) type)
{
//Code
}
}
【问题讨论】:
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
}
}
换句话说,为要在其参数之一中使用的方法指定通用参数。您不需要在正常调用方法的地方执行此操作,只需在声明中即可。
【讨论】: