/// <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 (WorkerId != null) { hashCode = hashCode * 59 + WorkerId.GetHashCode(); } if (Duty != null) { hashCode = hashCode * 59 + Duty.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (WorkerId.Length != 0) { hash ^= WorkerId.GetHashCode(); } if (WorkerAdress.Length != 0) { hash ^= WorkerAdress.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }