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.
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.
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
CodeBetter.com!). Go read it!