Extension methods - an introduction
Extension methods were introduced in C# 3.0. The MSDN defines it as follows:
Extension methods are static methods that can be invoked using instance method syntax. In effect, extension methods make it possible to extend existing types and constructed types with additional methods. —[emphasis mine]
So extension methods allow you to extend existing types by defining static methods, which can then be called as if they were instance methods. Let’s see how this works.
erikschierboom.com