전략 패턴 간단한 예제 Class 구현부 namespace StrategyPattern { class Context { private IStrategy IStrategy; public Context() { } public Context(IStrategy strategy) { IStrategy = strategy; } public void SetValue(IStrategy strategy) { IStrategy = strategy; } public void DoSomething() { Console.WriteLine("context DoSomething()"); var test = IStrategy.algo(1); } } public interface IStrategy { object algo(int da..