I\'m working with a domain model and was thinking about the various ways that we have to implement these two methods in .NET. What is your preferred strategy?
This i
In addition to the answers (I am not allowed to write comments) I would like to point out that Visual Studio can autogenerate Equals and GetHashCode. See this answer: Is there a way to automatically generate equals and hashcode method in Visual Studio I was really looking for that custom implementation and didnt find it here.
I woulld also like to link this question: Best way to compare two complex objects It is about having a nested class structure. Down in the comments one can find the case for nested class structures with Enumerations (for example with List ).