HashCodes

Namespace: System · class

Helper methods to work with hashcodes

Remarks

Use instead!

Methods

Combine

static int Combine(int h1, int h2)

static int Combine(int h1, int h2, int h3)

static int Combine(int h1, int h2, int h3, int h4)

static int Combine(int h1, int h2, int h3, int h4, int h5)

static int Combine(int h1, int h2, int h3, int h4, int h5, int h6)

Compute

static int Compute(long value)

static int Compute(ulong value)

static int Compute(bool value)

static int Compute(Guid value)

static int Compute(int? value)

static int Compute(long? value)

static int Compute(ulong? value)

static int Compute(bool? value)

static int Compute(Guid? value)

static int Compute(string value)

static int Compute<T>(T value)

static int Compute<T>(T? value)

static int Compute<T>(T value, IEqualityComparer comparer)

Flags

static int Flags(bool a)

static int Flags(bool a, bool b)

static int Flags(bool a, bool b, bool c)

static int Flags(bool a, bool b, bool c, bool d)

static int Flags(bool a, bool b, bool c, bool d, bool e)

static int Flags(bool a, bool b, bool c, bool d, bool e, bool f)

static int Flags(bool a, bool b, bool c, bool d, bool e, bool f, bool g)

static int Flags(bool a, bool b, bool c, bool d, bool e, bool f, bool g, bool h)

SameOrMissing

static bool SameOrMissing(int? h1, int? h2)

Test that both hash codes, if present, have the same value

Returns: False IIF h1 != nul && h2 != null && h1 != h2; otherwise, True