Closed upper-link closed 4 years ago
Because the internal method ComparerOverridesCollection/AddCompare throws an exception
ComparerOverridesCollection/AddCompare
public void AddComparer(MemberInfo memberInfo, IValueComparer valueComparer { if (memberInfo == null) { throw new ArgumentNullException(nameof(memberInfo)); } //if (_overridesByMember.ContainsKey(memberInfo)) //{ // throw new ValueComparerExistsException(memberInfo); //} _overridesByMember[memberInfo] = valueComparer ?? throw new ArgumentNullException(nameof(valueComparer)); }
@Upper-Link, can you please provide your code? It throws exception if member has already been overwritten.
Because the internal method
ComparerOverridesCollection/AddCompare
throws an exception