示例#1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = 17;
         result = result * 23 + ((fName != null) ? fName.GetHashCode() : 0);
         result = result * 23 + ((sName != null) ? sName.GetHashCode() : 0);
         result = result * 23 + ((tName != null) ? tName.GetHashCode() : 0);
         result = result * 23 + ((SSN != 0) ? SSN.GetHashCode() : 0);
         result = result * 23 + ((address != null) ? address.GetHashCode() : 0);
         result = result * 23 + ((mobile != null) ? mobile.GetHashCode() : 0);
         result = result * 23 + ((email != null) ? email.GetHashCode() : 0);
         result = result * 23 + specialty.GetHashCode();
         result = result * 23 + university.GetHashCode();
         result = result * 23 + faculty.GetHashCode();
         return(result);
     }
 }
示例#2
0
 /// <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 (Identification != null)
         {
             hashCode = hashCode * 59 + Identification.GetHashCode();
         }
         if (PersonalInfo != null)
         {
             hashCode = hashCode * 59 + PersonalInfo.GetHashCode();
         }
         if (EmploymentDetails != null)
         {
             hashCode = hashCode * 59 + EmploymentDetails.GetHashCode();
         }
         if (WorkLocations != null)
         {
             hashCode = hashCode * 59 + WorkLocations.GetHashCode();
         }
         if (Postings != null)
         {
             hashCode = hashCode * 59 + Postings.GetHashCode();
         }
         if (Contracts != null)
         {
             hashCode = hashCode * 59 + Contracts.GetHashCode();
         }
         if (Skills != null)
         {
             hashCode = hashCode * 59 + Skills.GetHashCode();
         }
         if (Specialties != null)
         {
             hashCode = hashCode * 59 + Specialties.GetHashCode();
         }
         if (Attributes != null)
         {
             hashCode = hashCode * 59 + Attributes.GetHashCode();
         }
         if (Visas != null)
         {
             hashCode = hashCode * 59 + Visas.GetHashCode();
         }
         if (WorkingRestrictions != null)
         {
             hashCode = hashCode * 59 + WorkingRestrictions.GetHashCode();
         }
         if (Availabilities != null)
         {
             hashCode = hashCode * 59 + Availabilities.GetHashCode();
         }
         if (PersonalPattern != null)
         {
             hashCode = hashCode * 59 + PersonalPattern.GetHashCode();
         }
         return(hashCode);
     }
 }