Book Review: C# in Depth


I just
finished my copy of C# in depth by Jon Skeet (published by Manning) and I highly
recommend this book to ANY C# professional programmer. Jon is the author of one
of the most informative blog

on C#. As soon as I realized that he was writing a book on advanced topics of
the language, I wanted to read it cover to cover. There are many, many C# books around
but with Jon’s one, I was sure that I could polish my knowledge of some aspects
of the language. And indeed I haven’t been disappointed.


The book
covers sequentially C#2 enhancements and then C#3 enhancements. This provides a
unique perspective on the language evolution, from a traditional modern OOP
language to a OOP / Functional hybrid one. When programming with C#, this is
not a luxury to know how to use functional constructs and especially closures.
Since I discover them back in 2004 while being an early adopter of C#2, it
definitely changed my coding style. When mixed with advanced language
constructs such as generics, type inference, contra/co variance,…closures
becomes a dramatic way to enhance your code conciseness and expressiveness.
Such power doesn’t come for free and you need first some proper education. IMHO
I don’t think that there is any other C# book around that has a better coverage
of these aspects. An interesting Jon’s note is that delegates were initially
done to implement the concept of event (i.e some kind of command, that perform an action and doesn’t return anything) and
become with C#2 first and C#3 after, a premium way to implement computational
stuff (i.e function, whose only
reason is to return something without any side-effects).


the entire LINQ cathedral sits on closures. But LINQ is not just a C#/VB.NET
language artefact and is surrounded by several frameworks. C# in depth is certainly a great introduction to LINQ but to make
the most of LINQ I would advise in addition the reading of a pure LINQ book,
such as LINQ in Action.


Not only
the content is great but also the writing. This is a concise 370 pages software
book. Jon doesn’t waste space (and tree!) to explain again and again basic C#
construct. Still, you’ll get some refresher on some underlying aspect of the
.NET platform such value vs. reference type, with many myths dispelled. I only
have 2 minor tacks: First I would have like some decompilation of some IL part with
Reflector. This is how I explained some advanced aspects of C# 2
and I still think it is the best way to teach some functional flows to a pure
OOP programmer. Using a tool such as Reflector is also a good reflex to have each time you have a doubt about what the compiler spit. Showing this reflex to
readers is not a luxury. Second, in a world where a single using clause can thoroughly
change the meaning of all code elements, I would have like A to Z code print
and not just some excerpt. Here again this is how I used to write book
and I still believe programmer needs full C# code file to read printed on the paper. But don’t take
me wrong. C# in depth is likely the best book available today to become a
better C# programmer
(and that’s what you want, else you wouldn’t be on!). Go read it!

This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Ying Jin

    I bought a license of NDepend for our shop but yet to have chance to play with it.

    I am sure I will learn a lot of NDepend trick from this blog.

  • Patrick Smacchia


    I am glad you liked my book, it was such a hard work to write.

    >Any plan to expand on that with a new book?

    Unfortunatly no, I am now full time on leading the dev of NDepend. I really enjoyed writting but managing such a softwawe development is an awesome experience.

  • Ying Jin

    With your words behind Jon’s book, I will definitely buy one copy and read it. Also I would recommend any OO programmer out there who really want to grasp idea of functional programming in C# to get a copy of your Practical .Net 2 and C#2. I find myself go back to your book again and again when I try to pick up C# 3 features and LINQ. So far I think your book is the first one touching on functional programming aspect within all the C# and .Net books. Any plan to expand on that with a new book?