StringSegment.GetHashCode Method

Definition

Returns the hash code for this instance.

public:
 override int GetHashCode();
public override int GetHashCode ();
override this.GetHashCode : unit -> int
Public Overrides Function GetHashCode () As Integer

Returns

A 32-bit signed integer that is the hash code for this instance.

Remarks

The returned hash code is suitable for use in hashing algorithms and data structures, for example, a hash table.

This method is expensive since it allocates on every call. However, the allocation is required to retain any behavior (such as hash code randomization) that GetHashCode() has.

Applies to