除了使用重构之外,是否可以从B类的实例中调用A.F()方法?谢谢。
class Program
{
public class A
{
public virtual void F()
{
Console.WriteLine( "A" );
}
}
public class B : A
{
public override void F()
{
Console.WriteLine( "B" );
}
}
static void Main( string[] args )
{
B b = new B();
//Here I need Invoke Method A.F() , but not overrode..
Console.ReadKey();
}
}