In eclipse, when I code in Java, there is a feature to auto-generate a basic, efficient, and bug free implementation of hashCode() and equals() without
hashCode()
equals()
Since you asked if also Visual Studio can do that: since XI.2017 it finaly can generate something useful.
Using ctr+. inside class and choosing "Generate Equals and GetHashCode"
See https://stackoverflow.com/a/48441971/4547594