Given same GUID Object.GetHashCode
produces different hash codes but Object.Equals
shows that same GUID equals.
The whole GUID:
Not same hash code:
Equals ==
true
:
And, obviously, both are System.Guid
:
Even when it's the same GUID, they're different values as they are deserialized from two sources.
Is this the expected behavior?
Your test is incorrect. In the final part where you're comparing the .GetType().FullName
, you are looking at the .Id
, but that is not what you are comparing above that.
So: the problem is in whatever the type is that has a .Id
, the thing that is in tags
and existingTags
. Look at the Equals
and GetHashCode
of that.