/// <summary> /// Returns true if WeatherInfo instances are equal /// </summary> /// <param name="other">Instance of WeatherInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(WeatherInfo other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Date == other.Date || Date != null && Date.Equals(other.Date) ) && ( Tmax == other.Tmax || Tmax != null && Tmax.Equals(other.Tmax) ) && ( Tmin == other.Tmin || Tmin != null && Tmin.Equals(other.Tmin) ) && ( Rainfall == other.Rainfall || Rainfall != null && Rainfall.Equals(other.Rainfall) ) && ( Wmean == other.Wmean || Wmean != null && Wmean.Equals(other.Wmean) ) && ( Wmax == other.Wmax || Wmax != null && Wmax.Equals(other.Wmax) ) && ( Insolation == other.Insolation || Insolation != null && Insolation.Equals(other.Insolation) ) && ( Sunshine == other.Sunshine || Sunshine != null && Sunshine.Equals(other.Sunshine) )); }