Created
June 6, 2011 18:22
-
-
Save hvitorino/1010766 to your computer and use it in GitHub Desktop.
Singleton C#
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 sealed class Singleton { | |
private static Singleton instance; | |
static Singleton() { | |
instance = new Singleton(); | |
} | |
public Singleton Instance { | |
get { return instance; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment