策略模式
摘要:今天研究一下策略模式。示例程序如下: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
浙公网安备 33010602011771号