Monthly Archives: January 2012
C# Static Field Initializers
I hit a problem recently where a singleton I was calling from an assembly resolver was throwing an exception. It turned out that the sync object used in the lock for the singleton pattern was null. How was this possible? Look at the code below: using System; public sealed class Singleton { private static volatile [...]
0
Login