Ejemplo n.º 1
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var result = (PatientGender != null ? PatientGender.GetHashCode() : 0);
         result = (result * 397) ^ (BirthDate.HasValue ? BirthDate.Value.GetHashCode() : 0);
         result = (result * 397) ^ (DeathDate.HasValue ? DeathDate.Value.GetHashCode() : 0);
         result = (result * 397) ^ (ContactPreference != null ? ContactPreference.GetHashCode() : 0);
         result = (result * 397) ^ (EmailAddress != null ? EmailAddress.GetHashCode() : 0);
         return(result);
     }
 }