Answer: Initializing static fields correctly

Well – quite a good discussion. This is one of the reasons I love blogs. I really learned something today based on your feedback and we made a change to the product because of it. So thanks for your feedback.

As many of you said, C1 and C2 result in the exact same behavior. The only difference is perf. Because C1 causes a type constructor (.cctor) to be created and the load time negative effected and possibilities for optimization are limited. So I was thinking that the answer should be C2 is better. But a couple of you pointed out that C1 is more explicit and matches “best practice” for C++ developers for years. So really what you want is the perf of C2, but the expressiveness of C1.

So I forwarded your feedback to the C# language designers and they quickly saw based on your comments it was a good idea. Peter Hallam the C# dev lead posted about the fix they chose. Oh, and for you VB and C++ heads, I did of course pass the feedback on to them as well.

So thanks and keep the comments coming, you are directly making the product better, even if in small ways.