C# 4.0 in a Nutshell, Fourth Edition

    • .NET
    • C#
    • .NET 4.0
    • C# 4
    • Dynamic
    • O’REILLY
    • C# IN A NUTSHELL
    • Book Review
  • modified:
  • reading: 4 minutes

C# in NutshellJust became a lucky owner of this book C# IN A NUTSHELL 4th edition. This is a fourth edition of this book’s series. I saw previous third edition of this book, we presented it on one of our events at Yaroslavl State University, but that book was a Russian translated version and published in Russia, this is was bad side of that book – all books at Russia printed on really bad paper. I should say that I didn’t read this book by end, but already I was surprised. Why? Why I heard a lot about Richter CLR via C# (English version of 3rd edition of this book I already have, and this book are waiting my attention), and just a few words about C# IN A NUTSHELL, at least in my sphere. I just listen once about this book at one of the podcast of Alt.Net group, and this words was Richter it is really good book, and C# IN A NUTSHELL it is a good handbook. My opinion is - you should read Richter if you want to develop with .NET. But if you want to develop on .NET with C# you should read C# IN A NUTSHELL too.

Now I will try to explain why I think that this book is really good. First, this book has a lot of samples, you can look on it on official book’s site at section Code Listings (I should say that there not all of them). And this samples not only because book should have samples, this samples a really small interesting goals, which you meet every day. For example, at section Parallel Programming you will see sample Parallel Spellchecker – and after look on it in your mind will born a lot of things where you can use it.

Second, this book really cools separated by topics. Incidentally, I didn’t turn up one's nose from first topic C# Basics, I read it. I think that maybe I can find something interesting for me. And at this (first!) topic you can find a lot of interesting studies. For example, you know that C# 4 became with named and optional parameters, but did you thought about this construction?

```csharp void Foo(int x, int y) { Console.WriteLine (x + ", " + y); } void OtherFoo() { int a = 0; Foo(y: ++a, x: --a); } ```

What will be first ++a or –a and what will you see at screen? Book has a lot of like these interesting (at first look unnecessary) examples. You will find a minus of this book – if you read Richter, when he show sample like this then he write a few papers with MSIL code and detailed explanations. At this book at most cases you will see that this is so, because it is so. It is not surprising, look how many topics this book has:

C# in Nutshell

If this book will have a detailed explanation for each sample, we will see a 5-volume book. Anyway you will find an explanation about why you should use constraints and when static readonly fields, about garbage collector, about… Really I don’t know any base topic which you will not find at this book.

Also the main goal of this book – it is has structure and useful stuff like a handbook. If you know C# 3 or early version you can fast read about new features of C# 4 at PLINQ, Dynamic, Code Contracts and some others topics. This book has more than 1000 pages. I suppose that next book will have 2-volumes or just an additional book for this one.

So this book will be interesting for Senior C# Developer for meeting with new features of .NET 4 and C# 4. Also this book will be interesting for Junior C# Developer too, but he should spend more time for reading. I really surprised how many samples and really interesting and good samples this book has. It was from 1st book’s version or it is a long 4th version way? My opinion that Junior C# Developer should start from Richter and then start read this book C# IN A NUTSHELL, or he can read them both.

If you a not English speaking (like me) man, I can recommend you to buy it in English, it is not a literary work and you can read it really easy with base English knowledge. For example you can read at first free topic Threading in C#. You can find book at O’REILLY site.

Did you read this book? What do you think about it?

See Also