MVC helper extension
-
19-08-2019 - |
Question
why do i get the error " Expected class, interface, enum or struct" with string underlined?
public static string IsSelected(this HtmlHelper helper, string A, string B)
{
return "wtf";
}
Solution
Your extension method needs to be inside a static class:
public static class MyExtensions
{
public static string IsSelected( this HtmlHelper helper, string A, string B)
{
return "wtf";
}
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow