EnumComparerTEnumGetHashCode(TEnum) Method

Returns a hash code for the specified TEnum instance.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public abstract int GetHashCode(
	TEnum obj
)

Parameters

obj  TEnum
The TEnum for which a hash code is to be returned.

Return Value

Int32
A hash code for the specified TEnum instance.

Implements

IEqualityComparerTGetHashCode(T)

Remarks

Returned hash code is not necessarily equals with own hash code of an enum value but provides a fast and well-spread value.

See Also