Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            SingletonObject ObjSingleton = SingletonObject.getInstance();

            ObjSingleton.ShowMessage();

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Singleton DP Demonstration
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            /*
             *
             *  //You would normally do this but method is private
             *  SingleObject singleObject = new SingleObject();
             */

            // Returns the instance var
            SingletonObject so = SingletonObject.getInstance();

            so.showMessage();
        }