public override int GetHashCode() { int hash = 1; if (CompanyId.Length != 0) { hash ^= CompanyId.GetHashCode(); } if (CompanyName.Length != 0) { hash ^= CompanyName.GetHashCode(); } if (Status != 0) { hash ^= Status.GetHashCode(); } if (AreaCode.Length != 0) { hash ^= AreaCode.GetHashCode(); } if (CreateTime.Length != 0) { hash ^= CreateTime.GetHashCode(); } if (Address.Length != 0) { hash ^= Address.GetHashCode(); } return(hash); }
/// <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 (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (CountryCallingCode != null) { hashCode = hashCode * 59 + CountryCallingCode.GetHashCode(); } if (AreaCode != null) { hashCode = hashCode * 59 + AreaCode.GetHashCode(); } if (Number != null) { hashCode = hashCode * 59 + Number.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { unchecked { int hashCode = base.GetHashCode(); hashCode = (hashCode * 397) ^ (CountryCode != null ? CountryCode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (AreaCode != null ? AreaCode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Number != null ? Number.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { const int hashSeed = 7; const int hashMultiplier = 13; var hash = hashSeed; hash = (hash * hashMultiplier) ^ (AreaCode is null ? 0 : AreaCode.GetHashCode()); hash = (hash * hashMultiplier) ^ (Exchange is null ? 0 : Exchange.GetHashCode()); hash = (hash * hashMultiplier) ^ (SubscriberNumber is null ? 0 : SubscriberNumber.GetHashCode()); return(hash); }
public override int GetHashCode() { unchecked { const int hashingBase = (int)2166136261; const int hashingMultiplier = 16777619; var hash = hashingBase; hash = (hash * hashingMultiplier) ^ (AreaCode?.GetHashCode() ?? 0); hash = (hash * hashingMultiplier) ^ (Exchange?.GetHashCode() ?? 0); hash = (hash * hashingMultiplier) ^ (SubscriberNumber?.GetHashCode() ?? 0); return(hash); } }
public override int GetHashCode() { unchecked { int hashCode = LocationId.GetHashCode(); hashCode = (hashCode * 397) ^ (CountryCode != null ? CountryCode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (RegionCode != null ? RegionCode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CityName != null ? CityName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PostalCode != null ? PostalCode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Latitude.GetHashCode(); hashCode = (hashCode * 397) ^ Longitude.GetHashCode(); hashCode = (hashCode * 397) ^ MetroCode.GetHashCode(); hashCode = (hashCode * 397) ^ (AreaCode != null ? AreaCode.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { const int HashingBase = (int)2166136261; const int HashingMultiplier = 16777619; int hash = HashingBase; hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, AreaCode) ? AreaCode.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Exchange) ? Exchange.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!object.ReferenceEquals(null, Number) ? Number.GetHashCode() : 0); return(hash); } }
/// <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 (IsPreferred != null) { hashCode = hashCode * 59 + IsPreferred.GetHashCode(); } if (Purpose != null) { hashCode = hashCode * 59 + Purpose.GetHashCode(); } if (CountryCode != null) { hashCode = hashCode * 59 + CountryCode.GetHashCode(); } if (AreaCode != null) { hashCode = hashCode * 59 + AreaCode.GetHashCode(); } if (Number != null) { hashCode = hashCode * 59 + Number.GetHashCode(); } if (Extension != null) { hashCode = hashCode * 59 + Extension.GetHashCode(); } if (FullNumber != null) { hashCode = hashCode * 59 + FullNumber.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { unchecked { // Choose large primes to avoid hashing collisions const int HashingBase = (int)2166136261; const int HashingMultiplier = 16777619; int hash = HashingBase; hash = (hash * HashingMultiplier) ^ (!Object.ReferenceEquals(null, AreaCode) ? AreaCode.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!Object.ReferenceEquals(null, Exchange) ? Exchange.GetHashCode() : 0); hash = (hash * HashingMultiplier) ^ (!Object.ReferenceEquals(null, SubscriberNumber) ? SubscriberNumber.GetHashCode() : 0); return(hash); } }
/// <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() { return(AreaCode.GetHashCode() + ExchangeCode.GetHashCode() + SubscriberNumber.GetHashCode()); }