Quick question about a reference type key in a generic dictionary in .Net

Posted by Jules on Stack Overflow See other posts from Stack Overflow or by Jules
Published on 2010-03-16T15:32:45Z Indexed on 2010/03/16 15:41 UTC
Read the original article Hit count: 312

Filed under:
|
|
|
|

I have a mutable class that I'm using as a key to a generic dictionary. Two keys should be equal only if their references are equal. From what I've read, in this case, I don't need to override Equals, GetHashCode , or implement IEqualityComparer.

Is this correct?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about dictionary