Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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 } }
换句话说,为要在其参数之一中使用的方法指定通用参数。您不需要在正常调用方法的地方执行此操作,只需在声明中即可。