Created
November 27, 2013 15:00
-
-
Save mathiassoeholm/7677099 to your computer and use it in GitHub Desktop.
Simplest C# Singlton From http://stackoverflow.com/questions/2550925/singleton-by-jon-skeet-clarification
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 Singleton instance = new Singleton(); | |
| public static Singleton Instance { get { return instance; } } | |
| static Singleton() {} | |
| private Singleton() {} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment