Ejemplo n.º 1
0
        /// <summary> Serves as the default hash function. </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            unchecked
            {
                var hash = 101;

                hash = hash * 103 + LeftBounded.GetHashCode();
                hash = hash * 107 + LeftItem.GetHashCode();
                hash = hash * 109 + RightItem.GetHashCode();
                hash = hash * 113 + RightBounded.GetHashCode();

                return(hash);
            }
        }
 /// <summary>
 /// Returns the hash code for this instance's state.
 /// </summary>
 /// <returns>A 32-bit signed integer that is the hash code for this instance's state.</returns>
 public override int GetHashCode()
 {
     return(LeftItem.GetHashCode() ^ RightItem.GetHashCode());
 }