コード例 #1
0
ファイル: Program.cs プロジェクト: Cattivo/DesignPatterns
        public static void Main()
        {
            AbstractFactory factory1 = new ConcreteFactory1();
            Client client1 = new Client(factory1);
            client1.Run();

            AbstractFactory factory2 = new ConcreteFactory2();
            Client client2 = new Client(factory2);
            client2.Run();

            Console.ReadKey();
        }
コード例 #2
0
        public static void Main()
        {
            AbstractFactory factory1 = new ConcreteFactory1();
            Client          client1  = new Client(factory1);

            client1.Run();

            AbstractFactory factory2 = new ConcreteFactory2();
            Client          client2  = new Client(factory2);

            client2.Run();

            Console.ReadKey();
        }