Adding methods to existing classes in C#

There are many times when we might want to add functionality to existing code. The existing code could be the classes written by ¬†fellow developers in our team or it could be third party code that we might want to use. The obvious choice is to create a new class by inheriting the existing class and add functionality to this …