/// <summary> /// Serves as a hash function for a particular type. <see cref="GetHashCode"/> is suitable for use /// in hashing algorithms and data structures like a hash table. /// </summary> /// <returns>A hash code for the current <see cref="GetHashCode"/>.</returns> public override int GetHashCode() { int hash = ExteriorRing.GetHashCode();; for (int i = 0; i < InteriorRings.Count; i++) { hash = hash ^ InteriorRings[i].GetHashCode(); } return(hash); }
/// <summary> /// Serves as a hash function for a particular type. <see cref="GetHashCode"/> is suitable for use /// in hashing algorithms and data structures like a hash table. /// </summary> /// <returns>A hash code for the current <see cref="GetHashCode"/>.</returns> public override int GetHashCode() { int hash = ExteriorRing.GetHashCode(); foreach (var t in InteriorRings) { hash = hash ^ t.GetHashCode(); } return(hash); }
/// <summary> /// Serves as a hash function for a particular type. <see cref="GetHashCode"/> is suitable for use /// in hashing algorithms and data structures like a hash table. /// </summary> /// <returns>A hash code for the current <see cref="GetHashCode"/>.</returns> public override Int32 GetHashCode() { Int32 hash = ExteriorRing.GetHashCode(); ; for (Int32 i = 0; i < InteriorRings.Count; i++) { hash = hash ^ InteriorRings[i].GetHashCode(); } return(hash); }