Skip to content

Instantly share code, notes, and snippets.

@sudipto80
Created February 2, 2016 11:13
Show Gist options
  • Save sudipto80/21acbd428df4b3ba0619 to your computer and use it in GitHub Desktop.
Save sudipto80/21acbd428df4b3ba0619 to your computer and use it in GitHub Desktop.
SingletonInput3
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