Example #1
0
        static void Main(string[] args)
        {
            // name = "";
            Test2 tt = new Test2();

            tt.GetDD();
            tt.Test();
            ISupplier obj = CarFactory.GiveMyCar(0);

            obj.CarSupplier();
            obj = CarFactory.GiveMyCar(1);
            obj.CarSupplier();

            TestType t = new TestType();
            string   a = t.GetValue();

            Console.Write(a);
            Console.ReadLine();

            //singletone design pattern
            //singleTon s = singleTon.Instance;
            //s.Data = 100;
            //Console.WriteLine("Data of S object : " + s.Data);
            //singleTon s1 = singleTon.Instance;
            //Console.WriteLine("Data of S1 object : " + s.Data);
            //Console.ReadLine();


            //Console.WriteLine("Hello World!");
            //Customer cu = new Customer(new OracleServer());
            //cu.cusAdd();
            //Console.ReadKey();
        }
Example #2
0
        static void Main(string[] args)
        {
            ISupplier car = CarFactory.GetCar(1);

            car.CarSupplier();
            car = CarFactory.GetCar(2);
            car.CarSupplier();
            Console.ReadLine();
        }