What does IEquatable
I use IEquatable
quite a lot, although from a pure technical perspective, it doesn't really give me any particular benefits. Overriding System.Object.Equals
can provide you with the same functionality.
However, I like the explicitness of implementing IEquatable
. I use the concepts of Entities and Value Objects from Domain-Driven Design quite a lot, and use IEquatable
particularly for Value Objects, simply because it signals that a type has well-defined equality.