I just posted this to my blog at work but thought I’d also pass it along to my .Netitude readers. Hope you find it useful! If you’re familiar with NuGet you know the benefits it provides .Net developers in consuming packages created by 3rd parties. Well, what if you want to treat somebody internal to… Read More »
I think we can all agree that extension methods are something that many of us have taken quite a shining to. Using them to adapt external dependencies, encapsulate common functionality for a 3rd party, and other conveniences has really helped to clean up my own codebase – I know that much.
Pretty cool trick I found today on StackOverflow. I’ve often struggled with the fact that when you’re writing a generic method, while you can constrain the type of the method, you can only specify the constraint of having a constructor, and even then, only a default constructor (eg: new()); not one with parameters.