Cookbooks always have something to interest any reader, but does this one have enough to make it worth buying?
This is a C# cookbook that has been around for a while. It has now reached its 4th edition and been updated to C# 6.0 - so some programmers must find it useful. However, cookbooks are a mixed set with each one solving a different problem. This one really is a cookbook and it makes no attempt to be a course in C# in disguise.
What this means is that the topics aren't in an order which leads you through features of the language in a logical order. In fact, this particular cookbook doesn't have much in the way of logical order at all. Topics sort of follow on in a vaguely connected way - classes and generics, collections, enumerators and iterators, data types, LINQ and lambdas, debugging, Reflection and dynamic programming, regular expressions, filesystems, networking and web, XML, Security, threading and toolbox. You can tell that this is just a general collection of language topics and task-oriented topics.
It has to be admitted that many of the recipes are not deep or difficult. Many of the recipes are just illustrations of standard techniques that you can find out about in the documentation. For example, Using the Web Browser control just fills in the obvious detail. Of course, it might help if the reader is a complete beginner but in that case the level of explanation is probably going to be insufficient:
Use the System.Windows.Forms.WebBrowser class to embed web browser functionality into your application.
No mention of exactly how to do this. This is fairly typical of the recipes in terms of how they are explained.
When the material becomes more complex then the lack of a clear simple explanation gets more important. For example, the recipes on lambda expressions are very difficult to understand unless you already have a good grasp of what a lambda expression actually is.
For example, I'm not at all sure is meant by:
Lambda expressions can be implemented by the compiler from methods created by the developer.
and I can't really guess at what idea this sentence trying to convey.
The account carries on with:
There are two orthogonal characteristics that lambda expressions may have:
- Parameter lists may have explicit of implicit types
- Bodies may be expressions or statement blocks
Yes these are in a very general sense othogonal but that orthogonality is of no importance and simply confuses the beginner.
Overall I found the presentation often unhelpful in this way. If you have the courage to read on eventually you will get to an example which should be easier to follow.
The second big problem with this book is that it is largely an opportunity to present the reader with some code. As long as you are happy reading the code to gain the main point of the recipe then all well and good, but if you are expecting to gain some understanding of the ideas before looking at the code this isn't the book for you.
This is not a cookbook for the expert because it doesn't cover anything very advanced or out of the ordinary. If you know C# then you can tackle any of the problems that this book treats as recipies with the help of the documentation. However, the book isn't ideal for the beginner because it simply isn't good at explaining the bigger picture and it often uses jargon that is potentially confusing. About the only reader going to be happy with this book is the intermediate level programmer who simply wanting to lift chunks of code for common tasks from the recipe to incorporate in their own programs. If this is what you are looking for then this is a suitable C# cookbook.