日期:2014-05-17  浏览次数:20567 次

razor helper 函数怎么写返回值
@helper helperName(//para)
{
  //code;
}

------解决方案--------------------
try this?
http://www.cnblogs.com/insus/p/3379485.html
------解决方案--------------------
用委托好了
Func<int,int,int> add = (x, y) => x + y;
使用
int x = add(1, 2); // x = 3
------解决方案--------------------
http://weblogs.asp.net/scottgu/archive/2011/05/12/asp-net-mvc-3-and-the-helper-syntax-within-razor.aspx

你这个定义委托好了,Func(T, TResult)…