Why does Guid.GetHashcode() returns 0 when instantiated with Guid.Empty ?

  • Thread starter Thread starter csharper
  • Start date Start date
What would you expect it to return?

Guid.Empty is a 128 bit number with a value of 0. The hash code
generator for the Guid generates an integer based on the values in the 128
bit number, without offsetting the values by a constant number. This is why
it results in 0.

Hope this helps.
 
Back
Top