public static GlobalSingleton Instance()
 {
     if (instance == null)
     {
         lock (lockObj) {
             if (instance == null)
             {
                 instance = new GlobalSingleton();
             }
         }
     }
     return(instance);
 }
Exemple #2
0
        static void Main(string[] args)
        {
            GlobalSingleton singleton = GlobalSingleton.Instance;

            foreach (string item in singleton.Currencies.getCurrencies())
            {
                Console.WriteLine(item);
            }

            foreach (string item in singleton.Countries.getCounties())
            {
                Console.WriteLine(item);
            }
        }