static void Main(string[] args) { FrozenThroneFactory ractory = new FrozenThroneFactory(); Human human = ractory.CreateHuman(); human.ShowKing(); Console.Read(); }
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(); }