Created
          November 14, 2014 08:00 
        
      - 
      
- 
        Save OliverRC/754e6d5414296eda7f32 to your computer and use it in GitHub Desktop. 
    Singleton
  
        
  
    
      This file contains hidden or 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 sealed class Singleton | |
| { | |
| private static readonly Lazy<Singleton> lazy = | |
| new Lazy<Singleton>(() => new Singleton()); | |
| public static Singleton Instance { get { return lazy.Value; } } | |
| private Singleton() | |
| { | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment