/// <summary>
/// Thread safe Singleton with full lazy instantiation
/// </summary>
public class Singleton
{
    /// <summary>
    /// Private Constructor
    /// </summary>
    private Singleton()
    {
    }
    
    public static Singleton Instance
    {
        get
        {
            return Nested._instance;
        }
    }
    
    private class Nested
    {
        /// <summary>
        /// Explicit static constructor to tell C# compiler
        /// not to mark type as beforefieldinit
        /// </summary>
        static Nested()
        {
        }
        
        internal static readonly Singleton _instance = new Singleton();
    }
}