public class BaseConcrete
{
public virtual void DoSomething()
{
// Original implementation.
}
}
public abstract class BaseAbstract: BaseConcrete
{
public abstract override void DoSomething();
}
public class SubConcrete: BaseAbstract
{
public override void DoSomething()
{
// New implementation.
}
}
如何访问DoSomething()
类的原始BaseConcrete
方法实现?在这种情况下,base
调用在此处不起作用。还有其他方法吗?提前谢谢。