After reading Ayende’s blog about GetHashCode, I found the following PDF file about the pitfalls of GetHashCode. 

I’ve coded it in a Java class but have yet to apply it anywhere else.

I don’t believe I’ve used any objects as keys in my applications.  I
mainly use value objects.  From a friend, I’ve heard that .NET
automatically prevents collisions by doing chaining (if two objects
have the same hashcode, the values are link-listed off that key)

Hash collision resolved by chaining.

Hash collision resolved by chaining.

Image borrowed from Wikipedia

About Jason Meridth

Continuously learning software developer trying to not let best be the enemy of better
This entry was posted in .NET. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

Comments are closed.