GetHashCode

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

Why was the GetHashCode operation given the lofty status
of being carried out by a member of the Object class?
 
Andrew said:
Why was the GetHashCode operation given the lofty status
of being carried out by a member of the Object class?

So that *any* object can be added to a Hashtable.
 
Well yes, it does do that. That is not really what I was
asking, though. Let me try to clarify. There are lots of
operations X such that it might be nice to perform X on
any object. But only a few of them actually make it into
the Object class. Why did GetHashCode make it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top