Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = MinLat.GetHashCode();
         hashCode = (hashCode * 397) ^ MinLon.GetHashCode();
         hashCode = (hashCode * 397) ^ MaxLat.GetHashCode();
         hashCode = (hashCode * 397) ^ MaxLon.GetHashCode();
         return(hashCode);
     }
 }
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)

                hashCode = hashCode * 59 + MinLat.GetHashCode();

                hashCode = hashCode * 59 + MaxLat.GetHashCode();

                hashCode = hashCode * 59 + MinLng.GetHashCode();

                hashCode = hashCode * 59 + MaxLng.GetHashCode();
                return(hashCode);
            }
        }
Exemplo n.º 3
0
 public override int GetHashCode()
 {
     return(MinLat.GetHashCode() ^ MinLng.GetHashCode() ^ MaxLat.GetHashCode() ^ MaxLng.GetHashCode());
 }