StableHashCodeExtensions
Set of extension methods, providing GetStableHashCode() through system classes
public static class StableHashCodeExtensions
Inheritance Object → StableHashCodeExtensions
Methods
GetStableHashCode(Object)
A stable hashcode.
Generic implementation for all objects. May not be stable.
public static int GetStableHashCode(object o)
Parameters
o
Object
Returns
GetStableHashCode(Int64)
A stable hashcode.
The default implementation is already stable.
public static int GetStableHashCode(long l)
Parameters
l
Int64
Returns
GetStableHashCode(BigInteger)
A stable hashcode.
The default implementation is already stable.
public static int GetStableHashCode(BigInteger bi)
Parameters
bi
BigInteger
Returns
GetStableHashCode(String)
A stable hashcode.
The default implementation is NOT stable, as a security feature.
public static int GetStableHashCode(string str)
Parameters
str
String
Returns
GetStableHashCode<T1>(ValueTuple<T1>)
Returns the stable hash code for the current ValueTuple<T1> instance.
public static int GetStableHashCode<T1>(ValueTuple<T1> tuple)
Type Parameters
T1
Parameters
tuple
ValueTuple<T1>
Returns
Int32
A 32-bit signed integer stable hash code.
GetStableHashCode<T1, T2>(ValueTuple<T1, T2>)
Returns the stable hash code for the current ValueTuple<T1, T2> instance.
public static int GetStableHashCode<T1, T2>(ValueTuple<T1, T2> tuple)
Type Parameters
T1
T2
Parameters
tuple
ValueTuple<T1, T2>
Returns
Int32
A 32-bit signed integer stable hash code.
GetStableHashCode<T1, T2, T3>(ValueTuple<T1, T2, T3>)
Returns the stable hash code for the current ValueTuple<T1, T2, T3> instance.
public static int GetStableHashCode<T1, T2, T3>(ValueTuple<T1, T2, T3> tuple)
Type Parameters
T1
T2
T3
Parameters
tuple
ValueTuple<T1, T2, T3>
Returns
Int32
A 32-bit signed integer stable hash code.
GetStableHashCode<T1, T2, T3, T4>(ValueTuple<T1, T2, T3, T4>)
Returns the stable hash code for the current ValueTuple<T1, T2, T3, T4> instance.
public static int GetStableHashCode<T1, T2, T3, T4>(ValueTuple<T1, T2, T3, T4> tuple)
Type Parameters
T1
T2
T3
T4
Parameters
tuple
ValueTuple<T1, T2, T3, T4>
Returns
Int32
A 32-bit signed integer stable hash code.
GetStableHashCode<T1, T2, T3, T4, T5>(ValueTuple<T1, T2, T3, T4, T5>)
Returns the stable hash code for the current ValueTuple<T1, T2, T3, T4, T5> instance.
public static int GetStableHashCode<T1, T2, T3, T4, T5>(ValueTuple<T1, T2, T3, T4, T5> tuple)
Type Parameters
T1
T2
T3
T4
T5
Parameters
tuple
ValueTuple<T1, T2, T3, T4, T5>
Returns
Int32
A 32-bit signed integer stable hash code.
HashStableCombine(params Int32[])
Combines a set of hashes into a single stable hash.
public static int HashStableCombine(params Int32[] hashes)
Parameters
hashes
Int32[]