/// <summary> /// Returns true if Phone instances are equal /// </summary> /// <param name="other">Instance of Phone to be compared</param> /// <returns>Boolean</returns> public bool Equals(Phone other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( CountryCallingCode == other.CountryCallingCode || CountryCallingCode != null && CountryCallingCode.Equals(other.CountryCallingCode) ) && ( AreaCode == other.AreaCode || AreaCode != null && AreaCode.Equals(other.AreaCode) ) && ( Number == other.Number || Number != null && Number.Equals(other.Number) )); }
/// <summary> /// Returns true if PhoneChannelPhone instances are equal /// </summary> /// <param name="other">Instance of PhoneChannelPhone to be compared</param> /// <returns>Boolean</returns> public bool Equals(PhoneChannelPhone other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( CountryCallingCode == other.CountryCallingCode || CountryCallingCode != null && CountryCallingCode.Equals(other.CountryCallingCode) ) && ( AreaCode == other.AreaCode || AreaCode != null && AreaCode.Equals(other.AreaCode) ) && ( Number == other.Number || Number != null && Number.Equals(other.Number) ) && ( AdditionalInfo == other.AdditionalInfo || AdditionalInfo != null && AdditionalInfo.Equals(other.AdditionalInfo) )); }