BobJanova wrote:
I think that you are only going to be sacrificing a bit of performance, not creating subtle bugs, because the .Net hashtable will look through all the items if it doesn't get a hash hit.
No, it won't. Mutating an object that is used as a dictionary key will cause bugs. The correct solution is to remove the object from the dictionary, then mutate the key, then re-add it. Or better, just make the key immutable, remove the object from the dictionary, and re-add it using another key.