0

Possible Duplicate:
Why is it important to override GetHashCode when Equals method is overriden in C#?

Why is GetHashCode important and where can we use it?

Community
  • 1
  • 1
oss
  • 11

1 Answers1

0

A quick Google search reveals the MSDN documentation for Object.GetHashCode. Quoting:

A hash code is a numeric value that is used to identify an object during equality testing. It can also serve as an index for an object in a collection.

The GetHashCode method is suitable for use in hashing algorithms and data structures such as a hash table.

As an aside, if you're thinking of overriding it yourself, have a read through that link and also some of the many SO questions that have been asked on the topic.

razlebe
  • 7,134
  • 6
  • 42
  • 57