Пример #1
0
        static void Main(string[] args)
        {
            AbstractDisplay cd  = new CharDisplay('T');
            AbstractDisplay sd  = new StringDisPlay("Design Pattern");
            AbstractDisplay sd2 = new StringDisPlay("Template Method");

            cd.Display();
            sd.Display();
            sd2.Display();
        }
Пример #2
0
        static void Main(string[] args)
        {
            AbstractDisplay d1 = new CharDisplay('H');
            AbstractDisplay d2 = new StringDisplay("Hello");

            Console.WriteLine("CharDisplay");
            d1.Display();

            Console.WriteLine("StringDisplay");
            d2.Display();

            Console.ReadLine();
        }
Пример #3
0
        static void Main(string[] args)
        {
            AbstractDisplay d1 = new CharDisplay('H');
            AbstractDisplay d2 = new StringDisplay("Hello World!");
            AbstractDisplay d3 = new StringDisplay("こんにちは。");

            d1.display();
            d2.display();
            d3.display();

#if DEBUG
            Console.ReadKey();
#endif
        }