Author: Ben Watson
Publisher: Sams, 2010
Aimed at: All C# programmers
Pros: Lots of really good ideas and techniques
Cons: Not quite enough explanation and discussion
Reviewed by: Mike James
This is essentially a cookbook that shows you the best way to use C# to solve various problems. Some of the problems are contrived just to allow the author to write about some topic or other- but this isn't a bad thing.
The topics vary from the very basic - how to create a 2D array, convert a string to a number and so on - to the more esoteric - how to enforce a contract in an interface, convert between number bases, using MVC and so on. Often a basic topic will be placed right along side a more advanced topic and there is no real logical progression from simple to advanced as you work through the book.
The book is spit into four parts. Starting off with C# fundamentals there are sections on everything from basic types to regular expressions and generics. Part Two is about data handling and this is interpreted to mean collections, files, networking, database and XML. Part Three is about user interaction and this takes us well beyond what might be considered core C# into the realm of WPF, ASP .NET and Silverlight. The book closes with Part Four on advanced C#. This has an account of LINQ, memory management, threads, asynchronous and parallel programming and reflection.
The biggest problem with the presentation is that each How-to is short on explanation. In most cases a problem is set and a brief "use this" answer provided. To find out and understand what "use this" means you have to read the code and especially the embedded comments. This mostly works but it would have been better to have just a little more discussion rather than the rapid move to code. This said it is an enjoyable read and you are certain to find something that you didn't know about no matter what level of C# you are working at. Reading it is a bit like turning over pebbles on a beach you never know what you are going to find. So if you want a fairly random but always interesting walk through the world of C# this is a good choice - recommended.