Passing two arguments into three parametred method?

53 Views Asked by At

How is it working when im passing only 2 arguments

List.cshtml

@Html.PageLinks(Model.PagingInfo, x => Url.Action("List", new { page = x }))

Into this method? PagingHelpers.cs

public static MvcHtmlString PageLinks(this HtmlHelper html,
            PagingInfo pagingInfo,
            Func<int, string> pageUrl)
1

There are 1 best solutions below

0
Patrick Hofman On BEST ANSWER

The key here is in this part of the method signature: this HtmlHelper html. The this indicates that the method is an extension method on an instance of HtmlHelper.

So the HtmlHelper html supplied to the method is the local Html property.