T
Tony Johansson
Hi!
When you use a class as key in a HashTable you is recommended to override
both Equals and GetHashCode if you want the
dictionary to work perfect and be fast.
If you override Equals but not GetHashCode the compiler will give you a
warning that you
have probably forgot to override GetHashCode.
But if you only override GetHashCode you will not get any warning about the
forgotten Equals isn't that strange ?
I would have hoped that you will have recived a waring even in this case.
//Tony
When you use a class as key in a HashTable you is recommended to override
both Equals and GetHashCode if you want the
dictionary to work perfect and be fast.
If you override Equals but not GetHashCode the compiler will give you a
warning that you
have probably forgot to override GetHashCode.
But if you only override GetHashCode you will not get any warning about the
forgotten Equals isn't that strange ?
I would have hoped that you will have recived a waring even in this case.
//Tony