// Use this for initialization
        void Start()
        {
            AbstractClass aA = new ConcreteClassA();

            aA.TemplateMethod();

            AbstractClass aB = new ConcreteClassB();

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

            template.TemplateMethod();
        }