With ReSharper's help you are able to quickly generate Equals() and GetHashCode() methods for a class.
To generate delegating members:


In the list, select the fields which you want to include in the GetHasCode() algorithm. Note that only those fields which were selected for the Equals() method are included in the list. Click Continue. The following dialog appears:

In the list, select the fields which you can assume to never hold a null value. This will result in a shorter and simpler implementation of GetHashCode() method. In this particular example, a string value is available to select (but that is purely optional). Click Finish.
The example used above starts with the following code:

After we go through the steps described above and click Finish, SalesItem class ends up looking like the following:

Note Currently, if Equals() and/or GetHashCode() methods already exist in a class, the Generate Equals and GetHashCode command will still be available for use. However, after these methods are automatically generated, you may have to comment out the old methods to prevent compilation errors.