ObjectStatic: GetHashCode

GetHashCode

Generates a hashcode for a specified value.



 Public Function GetHashCode(
	  ByRef Value As Variant ) As Long

Parameters

Value
[ByRef] Variant. The value to generate the hashcode for.

Return Values

Long -  A 32-bit integer hashcode value.

Remarks

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.

The default implementation of the GetHashCode method does not guarantee unique return values for different values. Furthermore, VBCorLib does not guarantee the default implementation of the GetHashCode method, and the value it returns will be the same between different versions of VBCorLib. Consequently, the default implementation of this method must not be used as a unique object identifier for hashing purposes.

See Also

Project CorLib Overview

Class ObjectStatic Overview