コード例 #1
0
            public int GetHashCode(BListBase <T> obj)
            {
                int hash = 0;

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

                return(hash);
            }
コード例 #2
0
            public bool Equals(BListBase <T> x, BListBase <T> y)
            {
                bool equals = x.Count == y.Count;

                if (equals)
                {
                    for (int i = 0; i < x.Count && equals; i++)
                    {
                        equals &= kValueEqualityComparer.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));
 }