C# Decimal GetHashCode
Description
Decimal GetHashCode
returns the hash code for this instance.
Syntax
Decimal.GetHashCode
has the following syntax.
public override int GetHashCode()
Returns
Decimal.GetHashCode
method returns A 32-bit signed integer hash code.
Example
Example of the decimal.GetHashCode method.
/*from w w w. j ava 2 s . c o m*/
using System;
class DecimalGetHashCodeDemo{
public static void Main( )
{
decimal d = 1M;
Console.WriteLine(d.GetHashCode());
}
}
The code above generates the following result.