Jeffrey Richter's Blog, page 3
July 16, 2010
Building a component that works with different versions of a library–STATIC METHODS
In my previous blog post, I discussed how to build a .NET component that works with different versions of a particular library. In that post, I demonstrated a technique for accessing instance methods that get added in a later version of a library. In this post, I'll modify the technique some to make it work reasonably well for static methods that get added in a later version of a library.
Let's starts by looking at Version 1.0 of some library class:
public sealed class VersioningType { ...
July 9, 2010
Building a component that works with different versions of a library
It's common to want to build a .NET component that works with different versions of a particular library. It is also common for newer versions of the library to introduce new methods that your component might want to call. However, if you build your component against the oldest version of the library you support, then your component cannot access the new methods unless you add code to your component that uses reflection to look for the new methods at runtime. In this blog post, I'd like to...
April 15, 2010
AsyncEnumerator Survey for Microsoft
If you have never used my AsyncEnumerator class (which is part of my free Power Threading library) to simplify writing code that performs asynchronous operations, then you can ignore the rest of this blog posting.
I have been working with Microsoft in an attempt to add my AsyncEnumerator (or something like it) into a future version of the .NET Framework.
The good folks at Microsoft would like to gather more information how people have actually used the AsyncEnumerator in their own projects.
To ...
March 17, 2010
I'm speaking at the DevWeek conference in London this week and did a short video interview
You can find Part 1 here: http://blogs.msdn.com/devpara/archive/2010/03/16/jeffrey-richter-at-devweek-2010-part-1.aspx
and Part 2 here: http://blogs.msdn.com/devpara/archive/2010/03/16/jeffrey-richter-at-devweek-2010-part-2.aspx
January 22, 2010
My CLR via C# book is at the printer. The source code and Introduction are available now!
Hello all, I just wanted to tell everyone that my book, CLR via C# 3rd Edition, went to the printer this week and should be in stores in early February!
The book has been updated for Visual Studio 2010, CLR 4.0 and C# 4.0.
The source code for the book is available now and can be downloaded from here: http://wintellect.com/Books.aspx
Also, an excerpt from the book's Introduction can be found here: http://blogs.msdn.com/microsoft_press/archive/2010/01/21/rtm-d-today-clr-via-c-third-edition.aspx
December 21, 2009
Receiving notifications when garbage collections occur
While creating the 3rd Edition of my CLR via C# book (http://www.amazon.com/CLR-via-C-Third-Pro-Developer/dp/0735627045/ref=dp_ob_title_bk), I came up with a cool little class that will raise an event after a collection of Generation 0 or Generation 2 occurs. Here is the code for the class:
public static class GCNotification {
private static Action<Int32> s_gcDone = null; // The event's field
public static event Action<Int32> GCDone {
add {
// If there were no registered...
November 1, 2009
What's new in CLR via C#, 3rd Edition as compared to the 2nd Edition
Last week I submitted the reaming chapters for my new book. It is now being edited and should be available right around the time that Visual Studio 2010 launches (March 22, 2010).
One place you can order it is here: http://www.amazon.com/CLR-via-C-Third-Pro-Developer/dp/0735627045
I know that many people will ask me what are the differences between the 2nd edition and the 3rd edition and so I thought I'd create this blog post to address this.
Overall, every chapter has been modified making...
October 12, 2009
Using .NET 4.0 Tasks with the AsyncEnumerator
I've been doing a lot of work with the new Task class that ships with .NET 4.0 as I've been revising my CLR via C# book (due out in early 2010).
Task are really good for performing asynchronous compute-bound work and while my AsyncEnumerator was really designed for performing I/O-bound work using the CLR's APM, it is possible to use Tasks with the AsyncEnumerator giving you the ability to easily perform I/O-bound as well as compute-bound work and use the AsyncEnumerator to coordinate it all...
August 21, 2009
Devscovery 2009 Redmond follow-up
During my CLR/BCL/C# 4.0 talk, a few people asked me questions for which I didn't have the answer. I have now researched these questions and have the answers.
Question #1: Are the new concurrent collection classes in .NET 4.0 serializable?
Answer: Yes, ConcurrentStack, ConcurrentQueue, ConcurrentBag, and ConcurrentDictionary are all serializable. However, the BlockingCollection class (which can wrap any of these except for ConcurrentDictionary) is not serializable.
Question #2: How d...
Jeffrey Richter's Blog
- Jeffrey Richter's profile
- 33 followers
