Reputation: 29664
I've been looking all over the place, but I can't find anything. Can anyone shed some light on this?
Upvotes: 47
Views: 19538
Reputation: 19986
Best way to hash 32 bit value to 32 bit is not to invent wheel, use value itself. Very fast, no collisions, indeed a perfect way.
Upvotes: 3
Reputation: 181094
According to Reflector:
public override int GetHashCode()
{
return this;
}
Makes sense, does it?
Upvotes: 79