/// <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 (LicensePlate != null) { hashCode = hashCode * 59 + LicensePlate.GetHashCode(); } if (Engine != null) { hashCode = hashCode * 59 + Engine.GetHashCode(); } if (Body != null) { hashCode = hashCode * 59 + Body.GetHashCode(); } if (LowVoltage != null) { hashCode = hashCode * 59 + LowVoltage.GetHashCode(); } if (Lighting != null) { hashCode = hashCode * 59 + Lighting.GetHashCode(); } if (Brakes != null) { hashCode = hashCode * 59 + Brakes.GetHashCode(); } if (Sensors != null) { hashCode = hashCode * 59 + Sensors.GetHashCode(); } if (Miscellaneous != null) { hashCode = hashCode * 59 + Miscellaneous.GetHashCode(); } if (Conditioning != null) { hashCode = hashCode * 59 + Conditioning.GetHashCode(); } return(hashCode); } }