Jump to content

CLR via C# – Jeffrey Richter

Posted on:November 21, 2010 at 01:00 AM

CLR via C# is one of the books that should be considered to be read by an experienced .NET software engineer. I would not recommend this book to a novice software engineer. This book touches many (if not all) advanced areas in .NET framework up to 4.0. Jeffrey describes how the C# language is implemented the way it is or why C# compiler works as it works (i.e. why it uses callvirt IL instruction, instead of call IL instruction, when calling a non-virtual instance method). In several places the author has good arguments in hand to criticize the .NET development team for how they have implemented some CLR features (i.e. Exceptions mechanism) :)

The book is divided into 5 parts:

  1. CLR Basics (basic information about how CLR, assemblies, namespaces etc. are organized and working together)
  2. Designing Types (describes type inheritance model, classes, fields, methods, events, parameters, properties, generics and interfaces in all possible ways they can be used in C# and how they fit into CLR)
  3. Essential Types (deep study of System.String, Arrays, Delegates, Custom Attributes and Nullable Value Types)
  4. Core Facilities (this is one of the most important parts. Jeffrey describes in details Exceptions and State Management, Garbage Collection, CLR Hosting and AppDomains, Assembly Loading and Reflection, Runtime Serialization)
  5. Threading (describes how to write a multi-threaded application. Thread basics, Synchronous and Asynchronous Operation, Hybrid Thread Synchronization Constructs) After reading this book I understood that there were many things in .NET that I had no idea about or I didn’t know how they work internally (like Garbage Collector). Especially parts 4 and 5 are very valuable to be read.

The 3rd Edition was extended with new features available in .NET 4.0, i.e.: