collapse Blogs I Read collapse Table of Contents   1. Extension
Method Documentation - Jonathan Pryor's web log     1. Extension
Method Documentation  Extension Method Documentation - Jonathan
Pryor's web log  « How To Defend Against Software Patent FUD |
Main | DbLinq and Mono »  Extension Method Documentation  C# 3.0
adds a new language feature called extension methods. Extension
methods allow the "addition" of new instance methods to any
type, without modifying the type itself. This is extremely
powerful, arguably crack-adled, and exists because Visual Studio
users can't do anything without code completion (tongue firmly
in cheek).  It's also extremely useful, permitting LINQ and the
even more crack-adled thinking in Mono.Rocks (much of which I
wrote, and I'm not entirely sure if the "crack" is in jest or
not; sometimes I wonder...).  To create an extension method, you
first create a static class. A method within the static class is
an extension method if the first parameter's type has a this
modifier:  st