Collapse AllExpand All      Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: F# Code: JScript 
GetHashCode Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Serves as a hash function for a particular type.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)
Public Overridable Function GetHashCode As Integer
public virtual int GetHashCode()
public:
virtual int GetHashCode()
abstract GetHashCode : unit -> int 
override GetHashCode : unit -> int 
public function GetHashCode() : int

Return Value

Type: System..::..Int32
A hash code for the current Object.

A hash code is a numeric value that is used to identify an object during equality testing. It can also serve as an index for an object in a collection.

The GetHashCode method is suitable for use in hashing algorithms and data structures such as a hash table.