What should I do to distinguish it whether a derived class implements overriding of a method?
class BaseClass
{
public virtual void targetMethod() { return; }
}
class DerivedClass:BaseClass
{
public bool isOverrideTargetMethod()
{
//Here, I wants to judge whether DerivedClass is overrided targetMethod.
}
public override void targetMethod()
{
base.targetMethod();
}
}
Aucun commentaire:
Enregistrer un commentaire