Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public sealed class Singleton
- {
- private static readonly Lazy<Singleton>
- lazy =
- new Lazy<Singleton>
- (() => new Singleton());
- public static Singleton Instance { get { return lazy.Value; } }
- private Singleton()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement