Please also consider the simplest option, using
In addition to a correct answer by Oleksandr Kulchytsky, please see my comments to this answer.
The thing about overriding of
is not so trivial. I saw even pretty experienced developers who were confused. Short explanation is: it's important for some collection classes providing access by a key. For more detailed explanation, please see my past answer, recently updated:
Object.GetHashCode() Method in C#.Net
This is interesting enough and very important to understand, please see.