.NET Books

This page contains short reviews of books on developing for the Microsoft .NET Framework and Windows in general. Please see Developer Books for books on other programming subjects.

Archive Note: The newest .NET Framework version covered here is 4.0. Some books may have updated editions for newer versions. The oldest covered .NET Framework version is 3.0 as earlier books are either inherently obsolete today, or have been obsoleted by newer titles.

The entries in each section are sorted alphabetically by title. Each review contains a rating of 1–4 stars, according to the following scheme:

  • ****— Required reading, best choice for the subject matter
  • ***— Recommended reading but other books may be better
  • **— Sometimes useful but not generally recommended
  • *— Useless by any standard, find another book

As I usually do some research before buying a book, there are currently no one-star ratings here.

.NET 4.0 Books

C# in Depth — Jon Skeet, Manning 2010 (2nd ed.), ISBN 978-1-935182-47-4

**** This outstanding book is just as good as you might expect, given Skeet’s many excellent web articles on C#. There’s just one big drawback that potential readers should be aware of: C# in Depth does not offer a complete introduction to the C# language, but merely points out a few tricky issues with C# 1 before launching into a comprehensive discussion of the new features in C# 2–4.

Frankly, this is a shame because it prevents an otherwise well-deserved recommendation as the best available guide to the C# language. Top-notch in every respect, this book matches Skeet’s pleasant writing and thorough technical understanding with a clear logical structure and impeccable layout. Once you know the basics of C# 1, you should turn to C# in Depth for the best presentation of advanced features such as generics, iterators, lambda expressions, or LINQ queries.

C# 4.0 in a Nutshell — Joseph Albahari & Ben Albahari, O’Reilly 2010 (4th ed.), ISBN 978-0-596-80095-6

**** Covering not only the entire C# 4 language but also many fundamental Framework concepts and classes, this 1,000-page “Desktop Quick Reference” requires a rather sturdy desk! C# 4.0 in a Nutshell is a veritable encyclopaedia of almost any task that commonly occurs during practical C# development. Naturally, the book excludes those large self-contained libraries that are well-documented elsewhere, such as ASP.NET, Windows Forms, WCF and WPF.

Still, it is amazing just how many technologies the Albahari brothers do cover: besides the C# language proper, the list includes LINQ, XML, stream I/O, basic networking, serialization, reflection, security, threading, interoperation, and regular expressions. These chapters are no mere MSDN Library excerpts, either. Despite the book’s terseness, all topics are treated with surprising thoroughness, featuring a wealth of practical examples and notes on common usage, potential pitfalls, and relevant implementation details. Once you know the basics of C# and .NET, having all this information in one place is incredibly useful.

CLR via C# — Jeffrey Richter, Microsoft Press 2010 (3rd ed.), ISBN 978-0-7356-2704-8

**** This is the standard guide to the .NET Framework and required reading for all developers, regardless of programming language or application type. Richter lays the indispensable groundwork required to understand .NET programming, going all the way from high-level C# constructs to the resulting IL code, the CLR’s internal memory layout, and the Win32 functions that make it all work. If you haven’t read this book you might still function as a .NET code monkey for a while, but chances are you won’t know what you’re doing and you’ll constantly be baffled by unexpected behavior.

One caveat: Richter’s occasional rants about .NET design decisions and best practices should be taken with a grain of salt, but at least they are clearly set apart from the main text.

Pro WPF in C# 2010 — Matthew MacDonald, Apress 2010, ISBN 978-1-4302-7205-2

**** This 1,180-page monster covers the Windows Presentation Foundation in excruciating detail, starting from its technical foundations and then working its way up, in ever broadening circles, to the remotest niches of WPF functionality. Along the way, MacDonald gives a wealth of usage examples and warns about any little snag or issue you might encounter. Adam Nathan’s WPF 4 Unleashed is a better introduction for beginners, but I recommend MacDonald’s more comprehensive book as an excellent guide and reference for advanced WPF programmers.

(Astute readers may notice that I gave a strong recommendation against MacDonald’s similarly sized WinForms book, Pro .NET 2.0 Windows Forms and Custom Controls. I judged each book based on how far the provided information exceeds the free MSDN Library documentation: very little in the case of Pro Windows Forms, a great deal in the case of Pro WPF.)

Real-World Functional Programming — Tomas Petricek with Jon Skeet, Manning 2010, ISBN 978-1-933988-92-4

**** Petricek delivers a well-rounded introduction to the F# language, explaining functional idioms and patterns from the ground up, and with the aid of numerous code samples. In a surprising but very welcome departure from other language tutorials, most samples are also provided in idiomatic C# 4 so that the strengths and weaknesses of each language are immediately obvious. The book remains highly readable even while going into considerable detail on the more obscure corners of the F# language. Strongly recommended to anyone interested in functional .NET programming.

WPF 4 Unleashed — Adam Nathan, Sams 2010, ISBN 978-0-672-33119-0

**** You wouldn’t expect such a high-quality publication from Sams, otherwise notorious for an endless stream of “Teach Yourself X in Y Minutes” titles. Nathan is a veteran .NET engineer at Microsoft who treats his subject with deep knowledge and great enthusiasm, and easily imparts both to the reader with his concise and crystal-clear writing. The book also profits from a phenomenal use of layout and color that highlights each detail without impeding the coherence of the whole. The pages might look busy at first, but you will soon come to appreciate the skilful interweaving of text paragraphs, syntax-colored code samples, output illustrations, and various sidebars. WPF 4 Unleashed is highly informative and downright exciting to read – the best introduction to WPF and XAML you can buy.

.NET 3.0/3.5 Books

Applications = Code + Markup — Charles Petzold, Microsoft Press 2006, ISBN 0-7356-1957-3

** This eagerly awaited book supposedly marked the end of Petzold’s long career as an authority on practical programming (he later reversed himself). Announcing his shift to historical and theoretical subjects, Petzold blamed rampant piracy and stingy developers. Those who waste their money on this dreary tome will suspect another reason: Petzold no longer cares about ordinary application programming, and is unable or unwilling to properly explain new technologies in this area.

Applications = Code + Markup covers GUI and 2D graphics programming based on WPF via C# 2 and XAML. The first and worst problem is the partitioning implied by the title: the entire first half of the book completely ignores XAML! This might not sound so bad – until you realize that WPF was designed from the ground up for use with XAML. The C# API is relatively cumbersome, especially without the new C# 3 object initializer syntax, and only rarely used in practice. Petzold’s attempt to explain the WPF control library while shunning its natural API effectively destroys any value the book might have had, either as an introductory text or as a library reference.

There are other issues. Petzold’s writing is extremely dry and tedious – as if the author himself had trouble staying awake while going through overly familiar motions. At least half of the 1,000 pages are wasted on uninteresting and repetitive code samples that could have been provided as downloads. Conspicuously missing are any kind of illustrations – the output of those numerous code samples is never shown anywhere. On the upside, Petzold is careful and thorough as usual, so if you do manage to fight your way through his grey walls of text you’ll probably know as much as anyone about WPF. But why bother when Adams or MacDonald cover the same ground just as competently, and with so much more élan?

The C# Programming Language — Anders Hejlsberg, Mads Torgersen, Scott Wiltamuth & Peter Golde, Addison-Wesley 2008 (3rd ed.), ISBN 0-321-56299-2

** As with previous editions, this book is mostly a printed version of language specification found in subdirectory VC#\­Specifications\­1033 of every Visual Studio installation. Both documents have been reorganized to remove the annoying split between language versions that encumbered the second edition. Moreover, the book is now a “Special Annotated Edition” that intersperses comments by various C# experts among the reference text. Unfortunately, these comments are not nearly as numerous or interesting as those in the similarly structured Framework Design Guidelines, and I was rather surprised to find that none of the book’s four principal authors had contributed to them. While somewhat more useful than previous editions, the printed version remains non-essential for most developers.

Framework Design Guidelines — Brad Abrams & Krzysztof Cwalina, Addison-Wesley 2008 (2nd ed.), ISBN 0-321-54561-3

**** This book collects the design guidelines that are used internally by Microsoft’s .NET Framework team, but its real value lies in the frequently interspersed comments. Usually once or twice per page, the authors and many of their colleagues (Chris Brumme, Chris Sells, Rico Mariani, Jeff Richter, et al.) describe the intentions behind a guideline, its implications, possible exceptions, and even the team’s internal debates and disagreements. Highly recommended if you want to know why the CLR looks the way it does, and for improving your own .NET coding style.

The second edition adds 90 pages and covers several new .NET 3.x concepts (LINQ, dependency properties, XAML). The high quality of the first edition is generally sustained but I was somewhat disappointed to find virtually no comments on WPF. This library establishes a new framework that works quite differently than the rest of the BCL, and seems to break a number of the presented guidelines. A comparative discussion of the new WPF design concepts would have been enlightening.

Programming WPF — Chris Sells & Ian Griffiths, O’Reilly 2007 (2nd ed.), ISBN 0-596-51037-3

*** Sells and Griffiths are both veteran Windows Forms developers and writers, and their new WPF title lives up to expectations. Unfortunately, Adam Nathan’s WPF 4 Unleashed is a better introduction and Matthew MacDonald’s Pro WPF in C# 2010 is both more comprehensive and more detailed – which means that while Programming WPF is by no means bad, I cannot recommend it over these two titles.

Using MSBuild and Team Foundation Build — Sayed Ibrahim Hashimi & William Bartholomew, Microsoft Press 2009, ISBN 978-0-7356-2628-7

**** Finally, a good introduction to Microsoft’s new build engine! Only about a third of this book is specific to Visual Studio Team System, which is fortunate for those of us who don’t use it. The greater part covers the regular MSBuild 3.5 which comes with the free .NET Framework SDK and all Visual Studio editions. Lots of examples, lots of information, and strongly recommended to anyone who wants to read or edit MSBuild files.

Windows Books

COM+ Programming from the Ground Up — Mark Michaelis, Osborne/McGraw-Hill 2000, ISBN 0-07-212045-2

*** This book is edited by Herbert Schildt, so you know what to expect: lots and lots of code snippets with the occasional paragraph of text in-between. As a tutorial, COM+ Programming is clearly inferior to Dale Rogerson’s Inside COM (see below). However, I know of no other book that shows how to use the built-in COM support of MS Visual C++ (_com_error and _com_ptr_t). Another strong point is Michaelis’ comprehensive treatment of COM error handling and variant types, making the book a useful reference for specific implementation issues if not a good introduction.

Concurrent Programming on Windows — Joe Duffy, Addison-Wesley 2008, ISBN 0-321-43482-X

**** Joe Duffy is Microsoft’s resident concurrency expert and maintains an excellent weblog on the subject. This monumental 1,000-page book covers virtually everything you could possibly want to know about multithreading and synchronization, from general principles to the relevant Win32 and .NET APIs. Duffy’s treatment of individual topics within this vast scope is often surprisingly detailed, and always boasts liberal amounts of sample code.

The only significant downside is the terrible, or rather nonexistent, editing. Awkward phrases and obvious misprints abound, often distorting the meaning of text and code. Make sure to obtain the (non-exhaustive) list of errata! Regardless, the book is strongly recommended for all Windows developers.

Inside COM — Dale Rogerson, Microsoft Press 1996, ISBN 1-57231-349-8

**** This insightful and well-written book is a great introduction to Microsoft’s “Component Object Model.” Rogerson covers the fundamental concepts behind COM as well as important mechanisms such as class factories and dispatch interfaces. He does not go into great detail but he does offer plenty of example code. By and large, Inside COM is probably the best way to get started with COM programming.

The Old New Thing — Raymond Chen, Addison-Wesley 2007, ISBN 0-321-44030-7

**** An enhanced compilation of material that had previously appeared on Chen’s eponymous weblog, this book contains a cornucopia of amusing and enlightening factoids about the design of Microsoft Windows. Some chapters deal with peculiar low-level APIs that are of little relevance to users of modern programming languages, but every curious geek should delight in Chen’s tales about reserved file names inherited from MS-DOS, the strange behavior of the Windows desktop, or the mind-boggling efforts Microsoft spends on backward compatibility.

Programming Windows — Charles Petzold, Microsoft Press 1999 (5th ed.), ISBN 1-57231-995-X

**** The standard guide to the Win32 API used to be every Windows programmer’s starting point, although raw beginners might prefer a gentler introduction. Today, the majority of new Windows developers will want to use a .NET language, and indeed Petzold’s later books cover .NET technologies exclusively. If you do wish to learn the basic structure of a Windows program written in plain C, Programming Windows should serve as well as ever. However, you should keep the book’s venerable age in mind, and check whether any specific APIs have received updates or replacements in recent Windows versions.

Windows via C/C++ — Jeffrey Richter & Christophe Nasarre, Microsoft Press 2008 (5th ed.), ISBN 978-0-7356-2424-5

**** The once more retitled successor to Advanced Windows and Programming Applications for Windows is Microsoft’s second standard guide to the Win32 API and continues where Petzold left off. Richter and Nasarre cover OS fundamentals such as processes and threads, device I/O, memory management, DLL creation, and structured exception handling in great detail. Those who are still using C/C++ today and want to get closer to the system than the .NET Framework allows should find this book invaluable.

Windows Internals — Mark E. Russinovich & David A. Solomon with Alex Ionescu, Microsoft Press 2009 (5th ed.), ISBN 978-0-7356-2530-3

**** The fifth edition of this classic guide to the Windows operating system architecture was updated for Windows Vista and Server 2008. Russinovich is one of the creators of the indispensable Sysinternals utility suite. Accordingly, the book not only describes Windows’ internal mechanisms in great detail, but also shows how to use these and other tools to analyze your own system. If you are curious about any aspect of Windows architecture, this is where to look for answers.

Windows PowerShell in Action — Bruce Payette, Manning 2007, ISBN 1-932394-90-7

**** Payette worked on Unix shells before he went on to co-design Windows PowerShell, Microsoft’s new command-line and scripting environment. As good as PowerShell is, this book is even better. Payette describes a myriad of features without confusing the reader. He writes clearly and entertainingly, provides lots of sensible examples, and his frequent sidenotes on the evolution of the shell’s design contribute greatly to a better understanding of the final result. Mandatory reading for all PowerShell users.

Windows PowerShell Cookbook — Lee Holmes, O’Reilly 2010 (2nd ed.), ISBN 978-0-596-80150-2

**** “Cookbooks” are categorized repositories of useful code snippets. Usually I’m not a big fan of such books as the snippets tend to be obvious or redundant, assuming you know the language and have Internet access. PowerShell is not a usual language, however. Combining a terse and cryptic syntax with numerous built-in keywords, even more library functions, and full access to the .NET Framework, PowerShell offers a multitude of non-obvious approaches to most tasks. That’s why this particular Cookbook makes a great companion to Bruce Payette’s Windows PowerShell in Action.