更新时间:2022-06-21 01:34:23
如果将它们编写为扩展方法(静态类的静态方法),则可以.像这样:
You can, if you write them as extension methods (static methods of a static class). Something like:
public static string AMethod(this HtmlHelper html, int arg)
...
让您将cshtml文件中的方法称为
Lets you call the method in a cshtml file as
@Html.AMethod(5)