//MyAbstractFactory using System; ///////////////Basic Products//////////////// //AbstractProduct
//MyPrototype using System; using System.Collections; //abstract PageStylePrototype Class 'Prototype
//MyBridge using System; //-------------------------------------------------Class Manager //parent
//MyAdapter using System; //Class1 class SimpleDrawer { //Methods virtual public void SetColor(str
//MySingleton using System; //SingletonPage Class class SingletonPage { //Fields protected static
//MyBuilder using System; using System.Collections; ///////////////////////product////////////////
1. 为什么要用抽象工厂?用抽象工厂的好处 这里我暂时还想不出有什么好处 我觉得就是利用接口来实现封装其子类,让具体的工作交给它的子类去做。所以说这应该不能算抽象工厂的优点,只能算作接口的优点。
此文章是为了补充下面的文章所写,详细信息可以去下面看 GOF书中的例子用C#实现的源码: using System; namespace AbstractFa
//MyComposite using System; using System.Collections; //----------------------------------Class Fi
//MyFactoryMethod using System; using System.Collections; //SinglePage class,which build the at last