METHOD

Object.GetHashCode

Produces a hash code consistent with equality; collisions are permitted.

Formal Syntax & Structure

csharp syntaxcsharp
public virtual int GetHashCode();

Working Example

Example Snippetcsharp
System.Console.WriteLine(7.GetHashCode() == 7.GetHashCode());
C# & .NET Reference