I was looking for information about this structure but I could’t found it; so if someone have time to explain this or point to some URl where it’s explained.
I found this definition at function sin web C# applications as for example:
public static class PrincipalExtensions
{
public static Site.Web.Models.SiteIdentity SiteIdentity(this System.Security.Principal.IPrincipal principal)
{
.....
}
}
This is an extension method. See the following article for detailed information : http://msdn.microsoft.com/en-us/library/bb383977.aspx
Short version : this constructs enables you to make some methods available to be called on a class instance, even if you cannot (or do not) want to inherit from the class. It will not give you access to protected or private members/fields/methods.
Most notable usage : extension methods on IEnumerable / IQueryable in System.Linq namespace.