Table of Contents

Method SequentialValuesHash

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

SequentialValuesHash<T>(IEnumerable<T>)

Computes a sequence-sensitive hash code for a collection of values using high-entropy mixing.

public static int SequentialValuesHash<T>(IEnumerable<T> values)

Parameters

values IEnumerable<T>

An IEnumerable<T> of values to hash. If null, returns 0.

Returns

int

A 32-bit hash code representing the ordered contents of the sequence. Equal sequences produce equal hashes.

Type Parameters

T

The type of elements in the input sequence.

Remarks

This method combines the hash codes of each item using a dispersion-aware mixing strategy defined in CombineHashCodes. The order of elements influences the result, making the hash sensitive to positional changes.