Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((City?.GetHashCode() * 397 ?? 0) ^
                (Street?.GetHashCode() * 397 ?? 0) ^
                (Housenumber?.GetHashCode() * 397 ?? 0));
     }
 }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (Point != null)
         {
             hashCode = hashCode * 59 + Point.GetHashCode();
         }
         if (OsmId != null)
         {
             hashCode = hashCode * 59 + OsmId.GetHashCode();
         }
         if (OsmType != null)
         {
             hashCode = hashCode * 59 + OsmType.GetHashCode();
         }
         if (OsmKey != null)
         {
             hashCode = hashCode * 59 + OsmKey.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Country != null)
         {
             hashCode = hashCode * 59 + Country.GetHashCode();
         }
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (State != null)
         {
             hashCode = hashCode * 59 + State.GetHashCode();
         }
         if (Street != null)
         {
             hashCode = hashCode * 59 + Street.GetHashCode();
         }
         if (Housenumber != null)
         {
             hashCode = hashCode * 59 + Housenumber.GetHashCode();
         }
         if (Postcode != null)
         {
             hashCode = hashCode * 59 + Postcode.GetHashCode();
         }
         return(hashCode);
     }
 }