Beispiel #1
0
        static void Main(string[] args)
        {
            Daughter1 d1 = new Daughter1();
            Mother1   d2 = new Daughter1();

            d1.DoSmt1();
            d1.DoSmt2();
            d1.DoSmt4();

            d2.DoSmt1();
            d2.DoSmt2();
            d2.DoSmt4();

            Console.ReadKey();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Daughter1 d1 = new Daughter1();
            Mother1   d2 = new Daughter1();

            //  Mother1 d3 = new Mother1();  impossible

            d1.DoSmt1();
            d1.DoSmt4();
            (d1 as Mother1).DoSmt4();

            d2.DoSmt1();
            d2.DoSmt4();

            Console.ReadKey();
        }
        public static void Main(string[] args)
        {
            Daughter1 d1 = new Daughter1();
            Mother1   d2 = new Daughter1();

            //Mother1 d3 = new Mother1();

            d1.DoSmt1();
            d1.DoSmt4();
            (d1 as Mother1).DoSmt4();

            d2.DoSmt1();
            d2.DoSmt4();
            (d2 as Mother1).DoSmt4();
            d2.DoSmt5();
            d2.DoSmt6();
            d2.DoSmt7();

            (d2 as Interface1).DoSmt5();
            (d2 as Interface2).DoSmt7();

            Console.ReadKey();
        }