为什么我会在下划线的字符串中出现错误“Expected class,interface,enum or struct”?
public static string IsSelected(this HtmlHelper helper, string A, string B)
{
return "wtf";
}
答案 0 :(得分:6)
您的扩展方法需要在静态类中:
public static class MyExtensions
{
public static string IsSelected( this HtmlHelper helper, string A, string B)
{
return "wtf";
}
}