예제 #1
0
 public static Singleton GetObject()
 {
     if (obj == null)
     {
         obj = new Singleton();
     }
     return obj;
 }
예제 #2
0
        public static Singleton Instance()
        {
            if (instance == null)
            {
                instance = new Singleton();
            }

            return instance;
        }