I\'m reading the Pro MVC 2 book, and there is an example of creating an extension method for the HtmlHelper class.
Here the code example:
public stat
Because the PageLinks
method is an Extension Method.
In extension method, the first parameter starts with this keyword to indicate that it is an Extension method on the type represented by the first parameter.
The Func
is a delegate which represents a transformation from type T1
to type T2
. So basically, your PageLinks
method will apply that transformation to int
to produce a string
.