Take advantage of extension methods to add functionality to existing types without needing to modify or derive from those original types. In the C# programming language, extension methods enable you ...
So I'm at a client's site and we're discussing adding a new method to an existing class. One of the client's programmers said, "We should put the method in the base class and let all the derived ...
Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources. This article dives into the happens-before ...
Creating a full-featured extension for the ASP.NET MVC HtmlHelper class sounds like a lot of work. But, because of the way the Microsoft .NET Framework works, it's almost trivially easy. To show that, ...