Skip to content
Discussion options

You must be logged in to vote

Thank you for pointing that out.
GetHashCode has been rewritten to call SipHash.

        private class DecimalEqualityComparer : IEqualityComparer<decimal>, IEqualityComparer
        {
            internal static readonly DecimalEqualityComparer Instance = new();
            internal static readonly SipHash SipHashInstance = new();

            public bool Equals(decimal x, decimal y) => EqualityComparer<decimal?>.Default.Equals(x, y);

            bool IEqualityComparer.Equals(object? x, object? y) => ((IEqualityComparer)EqualityComparer<decimal>.Default).Equals(x, y);

            public int GetHashCode(object obj) => this.GetHashCode((decimal)obj);
            public int GetHashCode([D…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@OSK-KOIDO04466
Comment options

@AArnott
Comment options

@OSK-KOIDO04466
Comment options

Answer selected by AArnott
Comment options

You must be logged in to vote
2 replies
@AArnott
Comment options

@AArnott
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants