Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
public abstract class ThreadSafeLazyBaseSingleton<T>
where T : new()
{
private static readonly Lazy<T> lazy = new Lazy<T>(() => new T());
public static T Instance
{
get
{
return lazy.Value;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment