Overriding IEquatable<T> when T is an interface and hashcodes are different between derived types
问题 I have A and B classes both implementing interface I . public interface I { int SomeInt { get; } bool SomeBool { get; } float SomeFloat { get; } } public class A : I { public int SomeInt { get; } public bool SomeBool { get; } public float SomeFloat { get; } private readonly string _someARelatedStuff; // Rest of class... } public class B : I { public int SomeInt { get; } public bool SomeBool { get; } public float SomeFloat { get; } private string readonly _someBRelatedStuff; private double