Пример #1
0
        static void Main(string[] args)
        {
            var    A = new ClassA("Name: A");
            ClassB B = new ClassB("Name: B");
            var    C = new ClassC("Name: C");

            A.Walk();
            B.Walk();
            B.BaseWalk();
            C.Walk();
        }
Пример #2
0
        static void Main()
        {
            ClassA instanceA = new ClassA();
            instanceA.Method1();
            instanceA.Method2();

            Console.WriteLine(new string('-', 15));

            ClassB instanceB = new ClassB();
            instanceB.Method1();
            instanceB.Method2();

            Console.WriteLine(new string('-', 15));

            ClassC instanceC = new ClassC();
            instanceC.Method1();
            instanceC.Method2();

            // Delay.
            Console.ReadKey();
        }
        static void Main()
        {
            ClassA instanceA = new ClassA();

            instanceA.Method1();
            instanceA.Method2();

            Console.WriteLine(new string('-', 15));

            ClassB instanceB = new ClassB();

            instanceB.Method1();
            instanceB.Method2();

            Console.WriteLine(new string('-', 15));

            ClassC instanceC = new ClassC();

            instanceC.Method1();
            instanceC.Method2();

            // Delay.
            Console.ReadKey();
        }