コード例 #1
0
        /// <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);
            }
        }
コード例 #2
0
ファイル: MBR.cs プロジェクト: embarassed/TrjTools
 public override int GetHashCode()
 {
     return(MinLat.GetHashCode() ^ MinLng.GetHashCode() ^ MaxLat.GetHashCode() ^ MaxLng.GetHashCode());
 }