Our first recommendation for a book of ideas and techniques is Ben Watson's C# 4.0 How-To (Sams, 2010). Mike James gave it a rating of 4.5, describing it as "an enjoyable read" and his review starts:
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.
Later he writes:
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.
Another title worth considering for the sheer number of recipes is Visual C# 2010 Recipes (Apress, 2010). Suitable for beginning to intermediate C# developers, it is divided into 17 chapters dealing with just about everything you could think of relevant to using C# including newer topics such as parallel programming, WPF 4 and LINQ. It is a thick tome and its disadvantage is that it includes many trivial recipes.
If you looking for a big book on C# to keep on your bookshelf as a reference we can recommend Pro C# 2010 and the .NET 4 Platform by Andrew Troelsen (Apress). Our review was of the 2010 5th Edition but the 2012 6th Edition covering C# 4.5 is in preparation.
Mike James' main criticism of this book that he described as "an encyclopedia of .NET from the point of view of C#" and "a genuinely useful book" was that at 1750 pages it was difficult to handle. Publisher Apress must have been listening as the new version is claimed to be 1600 pages even though it has been:
completely revised and rewritten to reflect the latest changes to the C# language specification and new advances in the .NET Framework.
According to the pre-publication blurb there are new chapters covering all the important new features of .NET 4.5 including:
.NET APIs for Metro-style apps
An improved Managed Extesibility Framework (MEF)
New asynchronous task-based model for async operations
How HTML5 support is being wrapped into C# web applications
New programming interfaces for HTTP applications, including improved IPv6 support
Expanded WPF, WCF and WF libraries
Given its title, you might expect C# 4.0 in a Nutshell (4th Edition) (O'Reilly, 2010) to be compact. Instead at over a thousand pages it is a "seriously thick book" and is likely to be "daunting for beginners". It doesn't restrict its coverage to what you might consider the core of C# but instead also covers framework topics including: collections, LINQ, Garbage collection, diagnostics, streams and I/O, networking, serialization, assemblies, reflection, dynamic types, security, threading, parallel programming, asynchronous methods, application domains, interop and regular expressions. Mike James' review, in which the book was rated as a 4, concludes:
This is a book C# programmers will find an useful addition to their bookshelves if they require a reference work on C# and the wider framework.
By contrast to the large size of the previous two books, C# 4.0 Pocket Reference (O'Reilly, 2010) is a small-format pocket reference on C#. In his review, Ian Elliot wrote:
"I read this particular guide from cover to cover in one sitting - something most readers won't do - and I have to say that it was a great way to make sure that I'd got C# into my head with no significant gaps. If you are an occasional C# user then this might be a good way to refresh your knowledge in double quick time.
Giving this title a star rating of 4.5, the review concludes:
If you want a really good pocket guide to C# 4.0 then this is it - just buy it. But don't expect a deep discussion of complex and subtle topics, this is the minimum presentation of what you need to know.
Author: Antonio Cangiano Publisher: Pragmatic Bookshelf Pages: 250 ISBN: 978-1934356883 Aimed at: Developers and technically-minded entrepreneurs Rating: 4.5 Pros: Readable style, helpful tips and interesting case studies Cons: May paint too optimistic a picture Reviewed by: Sue Gee