/// <summary> /// Determines whether this instance and another specified Location object /// have the same value. /// </summary> /// <param name="other">The Location to compare to this instance.</param> /// <returns> /// true if the value of the value parameter is the same as this instance; /// otherwise, false. /// </returns> public bool Equals(Location other) { if (ReferenceEquals(other, null)) { return(false); } return(Altitude.Equals(other.Altitude) && Latitude.Equals(other.Latitude) && Longitude.Equals(other.Longitude)); }
/// <summary> /// Determines whether this instance and another specified Location object /// have the same value. /// </summary> /// <param name="other">The Location to compare to this instance.</param> /// <returns> /// true if the value of the value parameter is the same as this instance; /// otherwise, false. /// </returns> public bool Equals(Location other) { if (other is null) { return(false); } return(Altitude.Equals(other.Altitude) && Latitude.Equals(other.Latitude) && Longitude.Equals(other.Longitude)); }