也谈.net下面的new、virtual和override(二)
先看下面的代码:class A{ public void T() { Console.WriteLine("A"); }}class B : A{ public new void T() { Console.WriteLine("B"); }}A a1 = new A();A a2 = new B();B b1 = new B();b b2 = (B)a2;a1.T();a2.T(