static void Main(string[] args) { AbstractClass a = new ConcreteClassA(); a.TempleteMethod(); a = new ConcreteClassB(); a.TempleteMethod(); }
static void Main(string[] args) { Template template; template = new ConcreteClassA(); template.TemplateMethod(); template = new ConcretaClassB(); template.TemplateMethod(); Console.ReadKey(); }
static void Main(string[] args) { AbstractClass c; c = new ConcreteClassA(); c.TemplateMethod(); c = new ConcreteClassB(); c.TemplateMethod(); Console.Read(); }
static void Main(string[] args) { AbstractClass c = new ConcreteClassA(); c.TemplateMethod(); }