C# 将两个参数传递给三参数方法?

C# 将两个参数传递给三参数方法?,c#,asp.net-mvc,razor,mvchtmlstring,C#,Asp.net Mvc,Razor,Mvchtmlstring,当我只传递2个参数时,它是如何工作的 List.cshtml @Html.PageLinks(Model.PagingInfo, x => Url.Action("List", new { page = x })) 你喜欢这种方法吗? PagingHelpers.cs public static MvcHtmlString PageLinks(this HtmlHelper html, PagingInfo pagingInfo, Func

当我只传递2个参数时,它是如何工作的

List.cshtml

@Html.PageLinks(Model.PagingInfo, x => Url.Action("List", new { page = x }))
你喜欢这种方法吗? PagingHelpers.cs

public static MvcHtmlString PageLinks(this HtmlHelper html,
            PagingInfo pagingInfo,
            Func<int, string> pageUrl)
public static MvcHtmlString页面链接(此HtmlHelper html,
PaginInfo PaginInfo,
Func页面(URL)

这里的键在方法签名的这一部分:
此HtmlHelper html
this
表示该方法是
HtmlHelper
实例上的扩展方法

因此,提供给该方法的
htmlHelperhtml
是本地
html
属性