Пример #1
0
        static void RunTemplateMethod()
        {
            AbstractClass aA = new ConcreteClassA();

            aA.TemplateMethod();

            AbstractClass aB = new ConcreteClassB();

            aB.TemplateMethod();
        }
Пример #2
0
        static void Main(string[] args)
        {
            AbstractClass aA = new ConcreteClassA();

            aA.TemplateMethod();

            AbstractClass aB = new ConcreteClassB();

            aB.TemplateMethod();

            Console.ReadLine();
        }