示例#1
0
        public static void Main()
        {
            SetTitle();
            Write("Welcome");

            var strat1  = new StrategyA();
            var strat2  = new StrategyB();
            var context = new Context();

            context.SetStrategy(strat1);
            context.Execution();

            context.SetStrategy(strat2);
            context.Execution();

            if (Debugger.IsAttached)
            {
                Console.ReadLine();
            }
        }