写出程序的输出结果
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();
}
}
这个题A a=new B();怎么理解,现在的a是啥了 |