Наследование: CSharpDecorator.Decorator
Пример #1
0
        static void Main(string[] args)
        {
            Tank tank = new T50();

            DecoratorA tankA = new DecoratorA(tank);
            DecoratorB tankB = new DecoratorB(tankA);
            DecoratorC tankC = new DecoratorC(tankB);

            tankB.Shot();
            tankB.Run();

            Console.WriteLine("=============================");

            tankC.Shot();
            tankC.Run();
        }