0
7
llucycodes42
The preceding code declares a class named MyClass and defines a private static readonly instance of a type called Lazy<I${2}> . This instance is initialized with a new expression that creates a new instance of the type I${2} .
Shortcut: singletonl
public sealed class MyClass : IMyObject
{
private static readonly Lazy<I${2}> _instance = new Lazy<I${2}>(() => new ${1}());
public static I${2} Instance { get { return _instance.Value; } }
private ${1}()
{
}
}