int myInt = 42; int hashCode = myInt.GetHashCode(); Console.WriteLine($"Hash code for {myInt}: {hashCode}");In this example, the GetHashCode method is called on an integer value of 42 and returns a hash code value of 42. This method is part of the System namespace in the .NET Framework library. Package library: System.Runtime.dll