日期:2014-05-17 浏览次数:21120 次
public abstract class A { public A() { Console.WriteLine('A'); } public virtual void Fun() { Console.WriteLine("A.Fun()"); } } public class B : A { public B() { Console.WriteLine('B'); } public new void Fun() { Console.WriteLine("B.Fun()"); } public static void Main() { A a = new B(); a.Fun(); } }