コード例 #1
0
 /// <summary>
 ///     Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked            // Overflow is fine, just wrap
     {
         int hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Industry != null)
         {
             hashCode = hashCode * 59 + Industry.GetHashCode();
         }
         if (Classification != null)
         {
             hashCode = hashCode * 59 + Classification.GetHashCode();
         }
         if (ListedDate != null)
         {
             hashCode = hashCode * 59 + ListedDate.GetHashCode();
         }
         if (DelistedDate != null)
         {
             hashCode = hashCode * 59 + DelistedDate.GetHashCode();
         }
         if (RegisteredCapital != null)
         {
             hashCode = hashCode * 59 + RegisteredCapital.GetHashCode();
         }
         if (LegalRepresentative != null)
         {
             hashCode = hashCode * 59 + LegalRepresentative.GetHashCode();
         }
         if (GeneralManager != null)
         {
             hashCode = hashCode * 59 + GeneralManager.GetHashCode();
         }
         if (Secretary != null)
         {
             hashCode = hashCode * 59 + Secretary.GetHashCode();
         }
         if (EmployeeCount != null)
         {
             hashCode = hashCode * 59 + EmployeeCount.GetHashCode();
         }
         if (Province != null)
         {
             hashCode = hashCode * 59 + Province.GetHashCode();
         }
         if (City != null)
         {
             hashCode = hashCode * 59 + City.GetHashCode();
         }
         if (Office != null)
         {
             hashCode = hashCode * 59 + Office.GetHashCode();
         }
         if (Email != null)
         {
             hashCode = hashCode * 59 + Email.GetHashCode();
         }
         if (Website != null)
         {
             hashCode = hashCode * 59 + Website.GetHashCode();
         }
         if (BusinessScope != null)
         {
             hashCode = hashCode * 59 + BusinessScope.GetHashCode();
         }
         if (MainBusiness != null)
         {
             hashCode = hashCode * 59 + MainBusiness.GetHashCode();
         }
         if (Introduction != null)
         {
             hashCode = hashCode * 59 + Introduction.GetHashCode();
         }
         return(hashCode);
     }
 }