public class A
{
public virtual void Base()
{
Console.WriteLine("A");
}
}
public class B : A
{
public override void Base()
{
Console.WriteLine("B");
base.Base();
}
}
public class C : B
{
public override void Base()
{
Console.WriteLine("C");
base.Base();
}
}
当我NEW B时,调用函数Base
C c = new C();
c.Base();
怎么才能不调用类开的函数,得到如下结果.
Console.WriteLine("C");
Console.WriteLine("A");