コード例 #1
0
        /// <summary>
        /// Entry point into console application.
        /// </summary>
        static void Main()
        {
            AbstractClass aA = new ConcreteClassA();
            aA.TemplateMethod();

            AbstractClass aB = new ConcreteClassB();
            aB.TemplateMethod();

            // Wait for user
            Console.ReadKey();
        }
コード例 #2
0
        /// <summary>
        /// Entry point into console application.
        /// </summary>
        static void Main()
        {
            AbstractClass aA = new ConcreteClassA();

            aA.TemplateMethod();

            AbstractClass aB = new ConcreteClassB();

            aB.TemplateMethod();

            // Wait for user
            Console.ReadKey();
        }
コード例 #3
0
        static void Main()
        {
            AbstractClass c;

            c = new ConcreteClassA();
            c.TemplateMethod();

            c = new ConcreteClassB();
            c.TemplateMethod();

            // Wait for user
            Console.Read();
        }