예제 #1
0
        public static void Implementation_Versus_Interface_Inheritance()
        {
            // 实现继承
            Class2 c2 = new Class2();

            Console.WriteLine(c2.S1());

            // 接口继承
            Class3 c3 = new Class3();

            Console.WriteLine(c3.S2());
        }
예제 #2
0
        public static void Implementation_Versus_Interface_Inheritance()
        {
            // 实现继承
            Class2 c2 = new Class2();
            Console.WriteLine(c2.S1());

            // 接口继承
            Class3 c3 = new Class3();
            Console.WriteLine(c3.S2());
        }