Given S, D value types here, when doing a.Equals(b), they end up using the Equals(object) overload.
Maybe it would be good to have EqualityComparer<T>.Default.Equals(a, b) there?
I initially wanted to suggest having S:IEquatable<D>, D:IEquatable<S>, There's also the problem when one of S values is null, since a.Equals(b) would NRE. I know that having nulls is bad design, but better safe than sorry?
Given S, D value types here, when doing
a.Equals(b), they end up using the Equals(object) overload.Maybe it would be good to have
EqualityComparer<T>.Default.Equals(a, b)there?I initially wanted to suggest having
S:IEquatable<D>,D:IEquatable<S>, There's also the problem when one of S values is null, sincea.Equals(b)would NRE. I know that having nulls is bad design, but better safe than sorry?