using System;

public class Singleton<T> where T : class, new()
{
    public static T Instance { private set; get; }

    public static bool HasInstance { get { return Instance != null; } }

    static Singleton()
    {
        Instance = new T();
    }

    public static void RemoveSingleton()
    {
        Instance = null;
    }
}