Create Extension Methods in C# and use same Extension Method in object of different types

If we want to add our own method to any type, we generally drive another type from this and add our method. This is one way but is not good if we only want to add one method which is not going to use private properties of our type object.

Another option could be to add Extension Method to any type. This way you can add your method to any type and it will be accessible in the type object you have created. Keep on reading