摘要:
Template Method模式的几个角色: 基类角色:定义的抽象方法、纯虚方法(一般设置为protected),Template方法(是对抽象方法、纯虚方法包装). 子类角色:重写基类的抽象方法、纯虚方法. 客户端角色:调用子类中的重写过的方法. 演示代码如下: using System; using System.Collections.Generic; using System.Te... 阅读全文
posted @ 2007-09-29 18:54
萧佰刚
阅读(291)
评论(2)
推荐(0)
浙公网安备 33010602011771号