C# Char GetHashCode
Description
Char GetHashCode
returns the hash code for this instance.
Syntax
Char.GetHashCode
has the following syntax.
public override int GetHashCode()
Returns
Char.GetHashCode
method returns A 32-bit signed integer hash code.
Example
The following code shows how to use the GetHashCode() method.
public class MainClass
{//from ww w .j a v a 2 s .com
public static void Main(string[] argv)
{
char c = 'a';
System.Console.WriteLine(c.GetHashCode());
}
}
The code above generates the following result.