Пример #1
0
        public override int GetHashCode()
        {
            var h1 = TableA.GetHashCode();
            var h2 = TableB.GetHashCode();

            unchecked
            {
                return((527 + h1) * 31 + h2);
            }
        }
Пример #2
0
        /// <summary>
        /// Returns the hash code for this instance.
        /// </summary>
        public override int GetHashCode()
        {
            var h1 = TableA.GetHashCode();
            var h2 = TableB.GetHashCode();

            // sort
            if (h1 < h2)
            {
                unchecked
                {
                    return((527 + h1) * 31 + h2);
                }
            }
            else
            {
                unchecked
                {
                    return((527 + h2) * 31 + h1);
                }
            }
        }