Wintellect Blogs

What’s new in CLR via C#, 4th Edition as compared to the 3rd Edition

12 Apr , 2013  

The 4th edition of my CLR via C# book is coming out next month and you can order it here. The new edition is updated for Visual Studio 2012, .NET 4.5, and C# 5; there is also some coverage of Windows 8. As the book focuses on the CLR & C#, the majority of the book is the same as in the previous edition since little has changed from the developer’s perspective. As always, I do review each and every chapter, I apply any reported errata improvements, fix any bugs, typos, or improve wording if a reader reported that something was confusing. I also update version numbers, screen shots, and any current thinking that differs from thinking in the past.

However, I have also made some significant enhancements to the 4th edition. I have rewritten the Garbage Collection chapter so the material is updated and presented in more organized fashion. Second, the chapter on Reflection has been rewritten because Microsoft has redesigned the Reflection APIs and the new API is the one that will survive into the future. The old Reflection API still exists for backward compatibility but it will eventually fade away (I removed all content related to the old API). The new Reflection API MUST be used when building Windows Store Apps. The new Reflection APIs have affected other chapters too (such as the delegates chapter where I talk about how to dynamically create delegate instances at runtime).

Speaking of Windows Store Apps, I have updated many of the chapters with considerations when building Windows Store Apps. And, I have added a brand new chapter entitled “Interoperating with WinRT Components” that describes how to consume WinRT components from C#. The chapter also shows how to produce C# WinRT components which can be consumed from other languages (such as JavaScript or native C++).

The only language feature new to C# 5.0 is the support for a new and simplified asynchronous programming model. This model is very similar to the model I produced years ago via my AsyncEnumerator class which has been freely available as part of my Power Threading library. To address C#’s asynchronous programming model, I have completely rewritten the “I/O Bound Asynchronous Operations” chapter. OK, C# has introduced another tiny language feature via Callee custom attributes and I also show how to use them in the same chapter.

When the book goes to the printer, I will post the source code on the Wintellect website.

  • Anonymous

    As many times as I’ve read them, your book and Russinovich et al’s book are on my auto-order list every time a new edition comes out. Thanks for sticking with this for so many years and I’m looking forward to reading the new content.

  • Anonymous

    Looking forward the new edition of this great book!
    Do you have plans to write next edition of Windows via C/C++ in point of Windows 8?

  • Congratulation Jeffrey! CLR via C# previous version was already a masterpiece, a must-have for any serious .NET programmer, and this is great that you upgraded the content.

  • Anonymous

    It would be great if this edition would be translated to german. 2nd edition was the last published in german…
    Really informative and helpful book. Thank you. 🙂

  • It is a pleasant surprise, you wrote a book again ! In reference to the forward of 3rd edition, we all lost hope that CLR via C# 4.0 edition will never come. Happy to have you covering the latest stuff. Keep going 🙂

  • Anonymous

    A comment that I saw on StackOverflow, a peek using Reflector, and a test similar to your MethodInfo example all suggest that RuntimeTypeHandle doesn’t use less heap than Type. I tried to paste the test code into this comment, but the comment system rejected it.

  • Anonymous

    Try as I might, I have not been able to memorize my favorite and go-to .NET book, CLR via C# 3rd Edition. However, among the things that stuck in my mind for some reason was that in the foreword, your wife claimed this was it for books from her hubby! So imagine my surprise to discover at random today that a 4th edition was out. I hope this means this is *not* the end, but in either case I’m happy to support such great work and will get the new edition.

  • Anonymous

    I just wondering do you cover in 4th edition new async infrastructure of C#. The use of ‘async’ and ‘wait’ statements? I saw the table of content on Amazon but didn’t find the answer there.

  • Anonymous

    Where can I download the example code of 4th edition?

  • Anonymous

    Great Work! (as usual)
    Hi Jeffrey,
    I am trying to implement your awesome algorithm for Reader/Writer Locks in the article using C++11 std but could not find an equivalent to Semaphore. I can implement one using mutex and conditional variable but they mandate thread ownership which I want to avoid, any advice?

  • Anonymous

    I think you might want to phrase a note in you book. i’ve discussed this on stackoverflow page

  • Based on your embedded assembly loading code I have created a new solution with better support for PCLs and symbols:

    Do not know if your code has been updated in the new edition of the book.

  • Anonymous

    The Amazon Kindle version of your C# Via CLR 4th edition does not have a Table of Contents which makes it hard to read.

  • Alain Dionne

    Is there a fifth edition coming soon ?

  • sm
  • Honzajscz

    So far the best book for .NET and C#. Totally love it. Will there be 5th edition that would cover the latest development in the C# and .NET framework?

    • Mystcreater

      This is exactly the same question in have. There are good reasons why there author don’t reply…. The stop of selling 4th edition. I think I will reply yes when the 5th version will be available. Mathematically, the 5th version should coming soon considering the time of releases between each edition.

      • Honzajscz

        Hope you are right. 🙂

  • Vladimir Kharitonov

    Where can I download the source code of 4th edition?