摘要: 策略模式UML图 概念 策略模式定义了一系列的算法,并将每一个算法封装起来,而且使它们还可以相互替换。策略模式让算法独立于使用它的客户而独立变化。(原文:The Strategy Pattern defines a family of algorithms,encapsulates each one,and makes them interchangeable. Strategy lets t... 阅读全文
posted @ 2009-04-20 10:07 MokLiu 阅读(342) 评论(0) 推荐(0) 编辑
摘要: C#基类和派生类 1.基类和派生类的一些基本概念class B : A{}A是基类,B是派生类.一个类最多只允许从一个类中派生.class C : B{}B还可以充当C的派生类继承总是隐式为public的,System.Object是所有类的根编译器会把你的类悄悄的编译成 class A : System.Object{}2.调用基类的构造函数 class B : A{public... 阅读全文
posted @ 2009-04-20 09:27 MokLiu 阅读(10265) 评论(0) 推荐(1) 编辑