AliasRefGetIsSameRefHashCode Method |
Calculate a hash code for the referenced object which is the same for all references where IsSameRef() is true.
Namespace:
Nova.CodeDOM
Assembly:
Nova.CodeDOM (in Nova.CodeDOM.dll) Version: 7.44.8391.13415
Syntax public override int GetIsSameRefHashCode()
Return Value
Type:
Int32Remarks
We don't want to override GetHashCode(), because we want all TypeRefs to have unique hashes so they can be
used as dictionary keys. However, we also sometimes want hashes to be the same if IsSameRef() is true, such
as the HashSet of Bound objects used by type inference in MatchCandidate - this method allows for that.
See Also