Edmund's zone

导航

2011年6月30日 #

策略模式

摘要: 今天研究一下策略模式。示例程序如下:Strategy.csnamespace StrategyPatternExample{ public interface Strategy { int Execute(int a, int b); }}Context.csnamespace StrategyPatternExample{ public class Context { private Strategy strategy; public Context(Strategy strategy) { this.strategy = strategy; } public int ExecuteStra 阅读全文

posted @ 2011-06-30 09:31 Edmund Li 阅读(247) 评论(0) 推荐(0) 编辑