/// <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 (Logradouro != null) { hashCode = hashCode * 59 + Logradouro.GetHashCode(); } if (Bairro != null) { hashCode = hashCode * 59 + Bairro.GetHashCode(); } if (Cidade != null) { hashCode = hashCode * 59 + Cidade.GetHashCode(); } if (Estado != null) { hashCode = hashCode * 59 + Estado.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (Logradouro.Length != 0) { hash ^= Logradouro.GetHashCode(); } if (Complemento.Length != 0) { hash ^= Complemento.GetHashCode(); } if (Bairro.Length != 0) { hash ^= Bairro.GetHashCode(); } if (Cidade.Length != 0) { hash ^= Cidade.GetHashCode(); } if (Pais.Length != 0) { hash ^= Pais.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
protected override int GetHashCodeCore() { unchecked { var hashCode = Logradouro.GetHashCode(); hashCode = (hashCode * 397) ^ Bairro.GetHashCode(); hashCode = (hashCode * 397) ^ Cidade.GetHashCode(); hashCode = (hashCode * 397) ^ Estado.GetHashCode(); hashCode = (hashCode * 397) ^ Cep.GetHashCode(); return(hashCode); } }
protected override int GetHashCodeCore() { unchecked { var hash = Logradouro.GetHashCode(); hash += (Numero.GetHashCode() * 907) ^ Numero.GetHashCode(); hash += (Complemento.GetHashCode() * 907) ^ Complemento.GetHashCode(); hash += (Bairro.GetHashCode() * 907) ^ Bairro.GetHashCode(); hash += (Cep.GetHashCode() * 907) ^ Cep.GetHashCode(); hash += (Cidade.GetHashCode() * 907) ^ Cidade.GetHashCode(); hash += (Estado.GetHashCode() * 907) ^ Estado.GetHashCode(); return(hash); } }