Even better equality checking

This commit is contained in:
2018-12-09 13:47:13 +01:00
parent 6e960e38ff
commit b63e8d37b5
7 changed files with 32 additions and 1 deletions

View File

@@ -65,6 +65,10 @@ namespace Upsilon.BaseTypes.UserData
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() == Value.GetType())
{
return obj.Equals(Value);
}
if (obj.GetType() != this.GetType()) return false;
return Equals((GenericUserData) obj);
}