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

13 Comments October 19, 2012


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.


13 Comments

  • Gravatar Image
    Brian Hartung October 21, 2012 11:33 AM

    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.

  • Gravatar Image
    O.D. October 21, 2012 2:57 PM

    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?

  • Gravatar Image
    Patrick Smacchia October 22, 2012 4:08 AM

    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.

  • Gravatar Image
    Mue November 23, 2012 2:17 AM

    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. :)

  • Gravatar Image
    Vaseem December 6, 2012 4:08 PM

    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 :)

  • Gravatar Image
    Will Montgomery December 12, 2012 1:48 PM

    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.

  • Gravatar Image
    Pete R December 20, 2012 4:56 PM

    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.

  • Gravatar Image
    Kolja December 28, 2012 3:50 PM

    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.

  • Gravatar Image
    Zhou Jing December 31, 2012 2:41 AM

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

  • Gravatar Image
    Nader Nashed October 23, 2013 7:16 AM

    Great Work! (as usual)
    Hi Jeffrey,
    I am trying to implement your awesome algorithm for Reader/Writer Locks in the article
    http://msdn.microsoft.com/en-us/magazine/cc163599.aspx 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?

  • Gravatar Image
    Rohit January 25, 2014 12:14 PM

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

    http://stackoverflow.com/questions/21350177/calling-task-wait-may-not-wait-if-the-task-has-not-yet-started/21350200?noredirect=1#21350200

  • Gravatar Image
    Harry February 18, 2014 11:35 AM

    Based on your embedded assembly loading code http://blogs.msdn.com/b/microsoft_press/archive/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition.aspx I have created a new solution with better support for PCLs and symbols:

    http://www.codingmurmur.com/2014/02/embedded-assembly-loading-with-support.html

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

  • Gravatar Image
    Daniel Morgan April 28, 2014 7:06 PM

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

Have a Comment?

Archives

Blogs