Exemplo n.º 1
0
        public static int GetHashCode <T>(SortedSetValue <T> value)
        {
            int hashCode = HashCode.Seed;

            hashCode = hashCode.HashWith(value.Count);

            foreach (T element in value)
            {
                // Since SortedSet is sorted, we can make a better hash code than XOR.
                hashCode = hashCode.HashWith(element);
            }

            return(hashCode);
        }
Exemplo n.º 2
0
 public static bool Equals <T>(SortedSetValue <T> first, SortedSetValue <T> second) => first.SetEquals(second);