【发布时间】:2017-06-28 17:11:13
【问题描述】:
virtual void MyMethod()
{
DoOneThing();
}
我想在这里实现DoAnotherThing() 和DoOneThing()-
override void MyMethod()
{
//DoOneThing() also.
DoAnotherThing();
}
有可能吗?
【问题讨论】:
-
抱歉,打错字了。我更新了我的问题。
-
只要使用
base.MyMethod();
标签: c# overriding virtual