可能重复:
Detect if a method was overridden using Reflection (C#)测试一个方法是否是一个覆盖?
有没有办法判断一个方法是重写?对于例如
public class Foo
{
public virtual void DoSomething() {}
public virtual int GimmeIntPleez() { return 0; }
}
public class BabyFoo: Foo
{
public override int GimmeIntPleez() { return -1; }
}
是否有可能反映BabyFoo
并告诉我们,如果GimmeIntPleez
是一个覆盖?
重复? - http://stackoverflow.com/questions/2932421/detect-if-a-method-was-overridden-using-reflection-c – 2010-06-16 18:07:06
在运行时,还是编译时间? – 2010-06-16 18:07:26
非常好!非常感谢,Petar。你如何找到这样的线程? – 2010-06-16 18:09:25