I have several entities I开发者_如何学Go need to make IEquatable(Of TEntity) respectively. I want them first to check equality between EntityId, then if both are zero, should check regarding to other
I have a class called MyClass This class inherits IEquatable and implements equals the way I need it to. (Meaning: when I compare two MyClass tyupe objects individually in code, it works)
I\'m new to C#. Perhaps I\'m not implementing IEquatable properly, because objects of my type that should be considered the same are not.
Anyone have any opinions on whether or not IEquatable<T> or IComparable<T> should generally require that T is sealed (if it\'s a class)?