I came across this code today and don't really understand it. Please could someone tell me what this means and how to interpret it? I have simplified it but it's basically the @ symbol followed by some HTML.
The call is:
@Html.Tmpl(@<p>text to display</p>)
The function is:
public static HelperResult Tmpl<TModel>( this HtmlHelper<TModel> html, Func<HtmlHelper<TModel>, HelperResult> template )
{
return new HelperResult( writer => template( html ).WriteTo( writer ) );
}
Please enlighten me. Thank you.