RuntimeHelpers.GetHashCode Method (Object)

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures such as a hash table.

Namespace: System.Runtime.CompilerServices
Assembly: mscorlib (in mscorlib.dll)

public:
static int GetHashCode (
	Object^ o
)
public static int GetHashCode (
	Object o
)
public static function GetHashCode (
	o : Object
) : int

Parameters

o

An Object to retrieve the hash code for.

Return Value

A hash code for the Object identified by the o parameter.

The following code example demonstrates how to use the GetHashCode method to generate a hash code.

No code example is currently available or this language may not be supported.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1

Community Additions

ADD
Show: