In my previous article, we took a detailed look at how and when to use extension methods. In this companion article, I’ll share several useful extension methods you can use in your own projects for free.
Isn’t it frustrating when you can’t edit a class to add a method you really need?
Maybe the class is built into your programming language or game engine, hidden away in a dll file, or buried in 3rd party code simply too risky to alter. Whichever the case, editing the original class isn’t an option.
This article will take an in-depth look at the various solutions to this common problem. We’ll explore some advantages, limitations, common pitfalls and best practices associated with each approach, and take a detailed look at one option which often gets overlooked: extension methods.