Review: Instant .NET 4.5 Extension Methods How-to (2013)
A quick introduction to .NET extension methods
In the 5+ years that I’ve been doing .NET I’ve been created my own extension methods twice. I was already aware that LINQ was built on extension methods, but I very rarely found myself needing to extend something that I didn’t already have the code for.
So, when I was asked if I wanted to review Instant .NET 4.5 Extension Methods How-to, I thought this would be a good way to make sure I didn’t have any incorrect assumptions, and see if there was anything I was missing.
This is my first ‘Instant’ book from Packt. From what I can tell the purpose is to get you quickly started with whatever the book is on. Since it’s my first, I’m not sure if this is unique to the book or not, but each of the sections has a title and then a classification of either ‘Must know,’ ‘Should know,’ or ‘Become an expert.’ Honestly, while the length of this book didn’t require it, I like this idea, since it allows you to easily dig into the required sections first, and then come back in your own time to read the others.
Unfortunately, in this particular case there was one ‘Should know’ that was after the ‘Become an expert’ section. Otherwise, the sections were grouped. It’s unfortunate not only because it breaks the flow (minor), but because it gives a suggestion on how to group your extensions. I would have much rather seen this as the very first in the ‘Should know’ section, but I may be bias since I like having commonly held conventions.
In regards to the actual content, it’s about what I expected. Each section has a short introduction about what will be shown, then sections to get ready, how to do it (code), how it works, and then occasionally additional information. The examples are straightforward, and consist of relatively few lines of code (which makes sense for what’s being covered).
After reading through the book I found that my knowledge of extension methods wasn’t lacking. I did like the technical explanation of how the compiler picks up on these, which also made the section I noted above about placement of extensions the most beneficial to me.
I can recommend this book to someone who wants to quickly learn about extension methods. Someone who’s made their own will probably find nothing new here, with the exception of the section on best practices. An intermediate user (has created one or two), is probably in the same boat as the advanced user.
In my particular case I received an electronic copy of the book for review. I’ve personally moved to electronic versions of my books as much as possible, in particular PDFs over any other electronic format. While I read a PDF version of the book (available for purchase on the Packt Publishing site), I don’t see any crazy formatting or graphics that would keep me away from the Kindle version. Either way, I’d steer more towards the electronic versions of the book as the print edition price suggests that they may have had a limited run, with even the publishers site pushing the electronic version.
Overall, I rate Instant .NET 4.5 Extension Methods How-to 4 of 5 stars, for a beginner. Extension methods aren’t too difficult, so a beginner could easily know what they need to after reading this book, and the best practices could even get them ahead.
Support This Site
If my blog was helpful to you, then please consider visiting my Amazon Wishlist.