GetHashCode() public method

public GetHashCode ( ) : int
return int
Exemplo n.º 1
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hash = 17;

                hash = hash * 23 + W.GetHashCode();
                hash = hash * 23 + V.GetHashCode();

                return(hash);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns a hash code for this instance.
        /// </summary>
        /// <returns>
        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        /// </returns>
        public override int GetHashCode()
        {
            // Overflow is fine, just wrap
            unchecked
            {
                int hash = 17;

                hash = hash * 29 + Minimum.GetHashCode();
                hash = hash * 29 + Maximum.GetHashCode();

                return(hash);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Returns a hash code for this instance.
        /// </summary>
        /// <returns>
        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        /// </returns>
        public override int GetHashCode()
        {
            // Overflow is fine, just wrap
            unchecked
            {
                int hash = 17;

                hash = hash * 29 + Center.GetHashCode();
                hash = hash * 29 + Radius.GetHashCode();

                return(hash);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Returns a hash code for this instance.
        /// </summary>
        /// <returns>
        /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
        /// </returns>
        public override int GetHashCode()
        {
            // Overflow is fine, just wrap
            unchecked
            {
                int hash = 17;

                hash = hash * 29 + Position.GetHashCode();
                hash = hash * 29 + Direction.GetHashCode();

                return(hash);
            }
        }