GetHashCode

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew

    GetHashCode

    Why was the GetHashCode operation given the lofty status
    of being carried out by a member of the Object class?
  • Jon Skeet

    #2
    Re: GetHashCode

    Andrew <asha@onezero.o rg> wrote:[color=blue]
    > Why was the GetHashCode operation given the lofty status
    > of being carried out by a member of the Object class?[/color]

    So that *any* object can be added to a Hashtable.

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    • Andrew

      #3
      Re: GetHashCode

      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?

      Comment

      Working...