示例#1
0
        static void Main(string[] args)
        {
            Base     b  = new Base();
            Derived1 d1 = new Derived1();
            Derived2 d2 = new Derived2();

            Console.ReadKey(true);
        }
示例#2
0
        private static void Main()
        {
            var test1 = new Derived1();
            var test2 = new Derived2();

            test1.DoSomethingWithTheSameTypeAsMe(test1);
            test2.DoSomethingWithTheSameTypeAsMe(test2);
        }