Love this book, a very easy way call “extension methods” can let you easily inject new method to existing classes (even you don’t have its source code). I tested it in windows with .net framework and mac .net core, both work correctly.
![](http://peter.quantr.hk/wp-content/uploads/2018/12/csharp-extension-method-600x450.jpg)
![](http://peter.quantr.hk/wp-content/uploads/2018/12/csharp-extension-method-in-win-600x375.png)
![](http://peter.quantr.hk/wp-content/uploads/2018/12/csharp-extension-method-in-dotnet-core-mac-600x375.png)
Love this book, a very easy way call “extension methods” can let you easily inject new method to existing classes (even you don’t have its source code). I tested it in windows with .net framework and mac .net core, both work correctly.