我可以以某种方式强制派生类始终调用重写的方法基础?
public class BaseClass
{
    public virtual void Update()
    {
        if(condition)
        {
            throw new Exception("..."); // Prevent derived method to be called
        }
    }
}
然后在派生类中:
public override void Update()
{
    base.Update(); // Forced call
    // Do any work
}
我搜索过并发现了一个使用非虚拟Update()的建议,还有一个受保护的虚拟UpdateEx().它只是感觉不是很整洁,有没有更好的方法?
我希望你能得到这个问题,我很抱歉任何不好的英语.