Book Review: Practical .NET2 and C#2
by Patrick Smacchia

by Peter A. Bromberg, Ph.D.

Peter Bromberg

In my short happy life as a .NET developer and C# MVP, I've learned that there are essentially three categories of .NET developers: Hobbyists, who use .NET for fun and who often go on to learn to use it to make a living, Professional Developers, who use .NET to make their primary living, and Master .NET Mechanics - the "guru-level" people. And, there are, of course, three types of books that .NET developers should read - basic "How to get to first base" books for the hobbyist (many of whom, by the way, eventually graduate to the second category), intermediate- to - advanced level books for the professional .NET developer, and finally, the "guru level" book for the Master Mechanics (or those who would be so).

Patrick Smacchia's Practical .NET2 and C#2 is a book by a Master Mechanic targeted primarily to Master Mechanics - and to those who would like to be. I know for a fact that Patrick has literally toiled for years developing the material for this book - and the level of detail and professionalism in the book bear this out. This is not a book for beginners - you will not learn how to drag a MenuControl from the Toolbox onto a web page, or how to databind a dropdownlist, although topics like this may be covered in the process of providing the "deeper Zen" of .NET.

What you will learn is all the nitty-gritty details of what makes CLR 2.0 and C# 2.0 work - right down to the bare metal of Intermediate Language. While the book does cover a lot of very common .NET programming scenarios, I would not recommend this book for the - shall we say, "uninstantiated". The set of wrenches depicted on the front cover of the book tells it all. This is a book for experts who need great detail about why things work and how they work -- and Mr. Smacchia owns up to the task with great clarity and professionalism.

The list of "Master .NET Mechanics" is not very long. It includes luminaries such as Jon Skeet, Willy DeNoyette, Jeff Richter, Stephen Toub, Jeff Prosise, Richard Grimes, Nick Paladino, Frans Bouma, Bart DeSmet, Juval Lowy, and many others. If your name didn't appear in my "short list", don't be offended -- I know who you are. And of course, Patrick Smacchia.

What's in this book?

Practical .NET2 and C#2 is not a "reworked .NET 1.1 book". There are plenty of those. It's all new, and all targeted to the .NET 2.0 platform. The book is logically divided into three parts:

Part I - The .NET2 Platform

Part II - The C# 2 Language

Part III - The Net2 Framework

I should begin by saying that the average customer review on this book at Amazon.com is 4.5 stars out of 5, so apparently there are some others who share my views! While the book does not limit itself totally to .NET 2.0 features, most of the material is on the 2.0 Framework.



From a practical standpoint, I can point you to Patrick's book website here to get more detail on the chapters and content, as well as to read quotes from notables who've read the book. Then I'm free to offer my own sentiments about what I particularly liked and why. You can also download 647 code samples -- and get a better flavor of whether this is a book you'd like to own.

From an editorial point of view, this is a book that, at least in part, was most likely written in French and has been translated to English. The editors probably do not speak English as their primary language, so you will find some idiomatic turns of phrase that may seem alien to you. Personally, I speak French so it wasn't particularly surprising to me, but I just wanted to clear the air on that point. For most readers, this should not be a problem at all, since the book's technical accuracy and detail is nothing short of astounding.

Since I've provided a link to the book website where you can find most of the information you need to evaluate the book, let me take a few paragraphs to point out some of the features that I find particularly valuable.

In the beginning of Chapter 2, Introduction to the IL Language, Smacchia provides a very detailed analysis of IL Instructions and Metadata tokens. In Chapter 3, there is extensive coverage of MSBuild and deployment, including MSI and ClickOnce technologies.

In Chapter 4, The CLR (Common Language Runtime), you will find more extensive coverage of AppDomains and everything about them than anywhere else that I have seen. It even gets into creating a custom runtime host. There is also extensive treatment of the Garbage Collector and the Managed Heap.

Constrained Execution Regions (CER), a new feature of .NET 2.0, is covered extensively here, including Memory Gates, Reliability Contracts and Critical Finalizers.

The treatment of Processes, threads and synchronization in Chapter 5 is about the most extensive coverage I have seen in any book for any version of the .NET Framework.

The above doesn't even get me through Section I of this book. The rest of the book is just as detailed and the converage of topics that you cannot find anywhere else is also extensive.

In the final analysis, I would recommend this book to any professional - level .NET Developer who has migrated to the 2.0 platform and whose goal is to feed their brain to get farther up the knowledge ladder toward eventual "Master Mechanic" guru level. You will keep this book on your desk for a very long time and refer to it frequently.

The book is 873 pages including a well-researched index, and has a sticker price of $59.95. As one would expect, it is available at various online booksellers at significant discounts.

Patrick also has a new product called NDepend that analyzes the .NET assemblies of an application and generates reports containing design quality metrics, warnings and diagrams, and we are publishing an article by Patrick here on this product shortly.


Peter Bromberg is a C# MVP, MCP, and .NET consultant who has worked in the banking and financial industry for 20 years. He has architected and developed web - based corporate distributed application solutions since 1995, and focuses exclusively on the .NET Platform.
Article Discussion: