/// <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 :) if (EnglishSpeaking != null) { hashCode = hashCode * 59 + EnglishSpeaking.GetHashCode(); } if (NonEnglishSpeaking != null) { hashCode = hashCode * 59 + NonEnglishSpeaking.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if BrandedFoodObjectCountryDetails instances are equal /// </summary> /// <param name="other">Instance of BrandedFoodObjectCountryDetails to be compared</param> /// <returns>Boolean</returns> public bool Equals(BrandedFoodObjectCountryDetails other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( EnglishSpeaking == other.EnglishSpeaking || EnglishSpeaking != null && EnglishSpeaking.Equals(other.EnglishSpeaking) ) && ( NonEnglishSpeaking == other.NonEnglishSpeaking || NonEnglishSpeaking != null && NonEnglishSpeaking.Equals(other.NonEnglishSpeaking) )); }