コード例 #1
0
        static void Main(string[] args)
        {
            FrozenThroneFactory ractory = new FrozenThroneFactory();
            Human human = ractory.CreateHuman();

            human.ShowKing();

            Console.Read();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: HvaiY/DesignMode
        static void Main(string[] args)
        {
            Console.WriteLine("欢迎大家来到.net高级班公开课程");

            BaseFactory factory = new FrozenThroneFactory();
            IRace       human   = factory.CreateFirst();

            human.ShowKing();

            BaseFactory sanguoshaFactory = new SanguoshaFactory();
            IRace       qun = sanguoshaFactory.CreateFourth();

            qun.ShowKing();

            Console.ReadKey();
        }