Created
February 2, 2016 11:13
-
-
Save sudipto80/21acbd428df4b3ba0619 to your computer and use it in GitHub Desktop.
SingletonInput3
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 APILookup | |
{ | |
private static readonly APILookup _instance = new APILookup(); | |
private Dictionary<string, int> _lookup; | |
private APILookup() | |
{ | |
try | |
{ | |
_lookup = Utility.GetLookup(); | |
} | |
catch { } | |
} | |
static APILookup() | |
{ | |
} | |
public static APILookup Instance | |
{ | |
get | |
{ | |
return _instance; | |
} | |
} | |
public Dictionary<string, int> GetLookup() | |
{ | |
return _lookup; | |
} | |
} | |
class A | |
{ | |
private A() | |
{ | |
} | |
public static APILookup _instance {get;set;} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment