Exemplo n.º 1
0
        static void Main(string[] args)
        {
            SingletonNormalWay obj = SingletonNormalWay.GetInstance();

            obj.ReturnMessage();



            StaticClass obj1 = StaticClass.ReturnIsntance();

            obj1.ReturnMessage();


            Experiment exp = new Experiment();

            exp.SayHello();

            Console.Read();
        }
Exemplo n.º 2
0
 public static StaticClass ReturnIsntance()
 {
     InstanceOfThisClass = new StaticClass();
     return(InstanceOfThisClass);
 }