Is Object.GetHashCode() unique to a reference or a value?

后端 未结 6 993
南方客
南方客 2020-12-24 12:58

The MSDN documentation on Object.GetHashCode() describes 3 contradicting rules for how the method should work.

  1. If two objects of the same type represent the
6条回答
  •  旧巷少年郎
    2020-12-24 13:21

    I can't know for sure how Object.GetHashCode is implemented in real .NET Framework, but in Rotor it uses SyncBlock index for the object as hashcode. There are some blog posts about it on the web, however most of them are from 2005.

提交回复
热议问题