.NET
Microsoft Technologies based on the .NET software framework.
4,103 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi, How does eqauls and hash code works together in C# ? Can you please elaborate? Thanks in advance,
For example, “if two objects compare as equal, the GetHashCode() method for each object must return the same value. However, if two objects do not compare as equal, the GetHashCode() methods for the two objects do not have to return different values”.
The aspects can be found in documentation: