Пример #1
0
            public int GetHashCode(BListBase <T> obj)
            {
                int hash     = 0;
                var comparer = kValueEqualityComparer;

                foreach (var o in obj)
                {
                    hash ^= comparer.GetHashCode(o);
                }

                return(hash);
            }
Пример #2
0
            public bool Equals(BListBase <T> x, BListBase <T> y)
            {
                bool equals = x.Count == y.Count;

                if (equals)
                {
                    var comparer = kValueEqualityComparer;
                    for (int i = 0; i < x.Count && equals; i++)
                    {
                        equals &= comparer.Equals(x[i], y[i]);
                    }
                }

                return(equals);
            }
Пример #3
0
 public int GetHashCode(BListBase <T> obj)
 {
     return(kEqualityComparer.GetHashCode(obj));
 }
Пример #4
0
 public bool Equals(BListBase <T> x, BListBase <T> y)
 {
     return(kEqualityComparer.Equals(x, y));
 }