Introduction: C# 3.0 provides a new feature called Extension Methods.  Extension methods are methods that can be added to previously defined classes without rebuilding/compiling those classes.
 
Process: To define an extension method, we first define a static class, Then we define our static method which is meant to be extended. The first parameter of the extension class should be the type of Object we need to extend.
 
Syntax:
public static (this )
{
        Do Something
         .........
         ......
         return ;
}

Hope you find this tips useful.

Thanks,
Bijayani

Replies

Know the answer? Post it — somebody with the same question will find it here.