このリンクでは、次のコードがあります。
public class Base
{
public virtual void Method(){}
}
public class Derived : Base
{
public new void Method(){}
}
そして、このように呼び出されます:
Base b = new Derived();
b.Method();
私の実際のコードはこれです:
public class Base
{
public void Method()
{
// bla bla bla
}
}
public class Derived : Base
{
public new void Method()
{
base.Method();
}
}
で呼び出す必要がありbase.Method();
ますか?
または、派生クラスのメソッドを空白のままにしますか?