/// <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); } }
/// <summary> /// Returns true if StockInfo instances are equal /// </summary> /// <param name="other">Instance of StockInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(StockInfo other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( Industry == other.Industry || Industry != null && Industry.Equals(other.Industry) ) && ( Classification == other.Classification || Classification != null && Classification.Equals(other.Classification) ) && ( ListedDate == other.ListedDate || ListedDate != null && ListedDate.Equals(other.ListedDate) ) && ( DelistedDate == other.DelistedDate || DelistedDate != null && DelistedDate.Equals(other.DelistedDate) ) && ( RegisteredCapital == other.RegisteredCapital || RegisteredCapital != null && RegisteredCapital.Equals(other.RegisteredCapital) ) && ( LegalRepresentative == other.LegalRepresentative || LegalRepresentative != null && LegalRepresentative.Equals(other.LegalRepresentative) ) && ( GeneralManager == other.GeneralManager || GeneralManager != null && GeneralManager.Equals(other.GeneralManager) ) && ( Secretary == other.Secretary || Secretary != null && Secretary.Equals(other.Secretary) ) && ( EmployeeCount == other.EmployeeCount || EmployeeCount != null && EmployeeCount.Equals(other.EmployeeCount) ) && ( Province == other.Province || Province != null && Province.Equals(other.Province) ) && ( City == other.City || City != null && City.Equals(other.City) ) && ( Office == other.Office || Office != null && Office.Equals(other.Office) ) && ( Email == other.Email || Email != null && Email.Equals(other.Email) ) && ( Website == other.Website || Website != null && Website.Equals(other.Website) ) && ( BusinessScope == other.BusinessScope || BusinessScope != null && BusinessScope.Equals(other.BusinessScope) ) && ( MainBusiness == other.MainBusiness || MainBusiness != null && MainBusiness.Equals(other.MainBusiness) ) && ( Introduction == other.Introduction || Introduction != null && Introduction.Equals(other.Introduction) )); }