This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Singleton | |
{ | |
private static readonly Lazy<Singleton> _lazy = new Lazy<Singleton>( | |
() => new Singleton(), isThreadSafe: true); | |
public static Singleton Instance | |
{ | |
get | |
{ | |
return Singleton._lazy.Value; |