GetHashCode()

Namespace ›› System ›› MfInt16 ›› Methods ››
Parent Previous Next

GetHashCode()

Overrides MfObject.GetHashCode()

OutputVar := instance.GetHashCode()

GetHashCode()

Gets A hash code for the MfInt16 instance.

Returns

A 32-bit signed integer hash code as var.

Throws

Throws MfNullReferenceException if object is not an instance.

Remarks

A hash code is a numeric value that is used to insert and identify an object in a hash-based collection such as a Hash table. The GetHashCode() method provides this hash code for hashing algorithms and data structures such as a hash table.

Two objects that are equal return hash codes that are equal. However, the reverse is not true: equal hash codes do not imply object equality, because different (unequal) objects can have identical hash codes. Furthermore, the this Framework does not guarantee the default implementation of the GetHashCode() method, and the value this method returns may differ between Framework versions such as 32-bit and 64-bit platforms. For these reasons, do not use the default implementation of this method as a unique object identifier for hashing purposes.

Caution

A hash code is intended for efficient insertion and lookup in collections that are based on a hash table. A hash code is not a permanent value. For this reason: