Windows apps
Collapse the table of content
Expand the table of content

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 virtual int GetHashCode()

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.

© 2017 Microsoft