摘要: The singleton pattern is one of the best-known patterns in software engineering. Essentially, a singleton is a class which only allows a single instance of itself to be created, and usually gives simp... 阅读全文
posted @ 2006-04-18 17:35 李阳 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 当我们设计一个类时,首先要规划这个类主要是干什么用的,并且对外要放出哪些接口。这时就要设计这个类的对外接口都有哪些了。在进行多层次开发的时候,由于下层对上层是透明的,上层无须知道下层的操作方式以及代码,因此我主张层与层之间的交互主要靠的是接口。尽量不要用类。下面的代码是设计的接口,类,以及其他的层的调用。 1 public interface IMaster 2 ... 阅读全文
posted @ 2006-04-18 14:53 李阳 阅读(2329) 评论(17) 推荐(0) 编辑
摘要: public clsSimuResultByOneGoods GetOneGoodsSimulationXML(string PathAndFileName) { clsSimuResultByOneGoods OneGoods = new clsSimuResultByOneGoods();//自己定义的一个类 Hashtable A... 阅读全文
posted @ 2006-04-18 11:50 李阳 阅读(569) 评论(0) 推荐(0) 编辑