posted 14 years ago
It's valid to compare them, because a ClassB IS-A ClassA. Which means that it's possible for ClassA and ClassB references to be equal. For example:
Then p0 == p1 is true.
The compiler will only stop you comparing them if they can't possibly be equal.