Пример #1
0
        static void Main(string[] args)
        {
            CarDoorFactory factory = new BenChiDoorFactory();
            Client l1 = new Client(factory);
            l1.Run();

            CarDoorFactory factory2 = new BaoMaDoorFactory();
            Client l2 = new Client(factory2);
            l2.Run();

            Console.ReadKey();
        }
Пример #2
0
        static void Main(string[] args)
        {
            CarDoorFactory factory = new BenChiDoorFactory();
            Client         l1      = new Client(factory);

            l1.Run();

            CarDoorFactory factory2 = new BaoMaDoorFactory();
            Client         l2       = new Client(factory2);

            l2.Run();

            Console.ReadKey();
        }