class A
{
public override int GetHashCode()
{
return 1;
}
}
class B : A
{
public override int GetHashCode()
{
return ((object)this).GetHashCode();
}
}
new B().GetHashCode()
堆栈溢出。如何从B.GetHashCode()
中调用Object.GetHashCode()
?
编辑:B
现在继承自A
。