Compartir a través de


StringSegment.GetHashCode Method

Definition

Returns a 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 hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

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