摘要: /// /// FPC抽象类/// public abstract class FPC{ /// /// FPC生产抽象方法 /// public abstract void Produce();}/// /// 生产GTL类/// public class GTL : ... 阅读全文
posted @ 2016-01-23 15:14 黄者之风 阅读(270) 评论(0) 推荐(0) 编辑
摘要: /// /// 简单工厂类/// public class FoodSim{ public static Food CreateFood(string str) { Food food = null; if (str == "C1") { ... 阅读全文
posted @ 2016-01-23 15:08 黄者之风 阅读(147) 评论(0) 推荐(0) 编辑
摘要: public class Singleton{ private static Singleton _instance;//定义一个私有Singleton类型字段,此处不实例化 private static readonly object locker = new object();// ... 阅读全文
posted @ 2016-01-23 15:03 黄者之风 阅读(220) 评论(0) 推荐(0) 编辑