Expression of HelperResult to format item from a list
问题 I'm doing a component to format a list, it is an Extension, I wrote the following code, but, when in execution time, it gives me the error: Cannot convert lambda expression to type 'System.Web.WebPages.HelperResult' because it is not a delegate type This is the extension: public static MvcHtmlString FormatMyList<TModel, TValue>(this HtmlHelper<TModel> htmlHelper, IEnumerable<TValue> list, Expression<Func<TValue, System.Web.WebPages.HelperResult>> formatExp = null) { foreach (var item in list)