/// <summary> /// Compares the <see cref="Measurement"/> with an <see cref="IMeasurement"/>. /// </summary> /// <param name="other">The <see cref="IMeasurement"/> to compare with the current <see cref="Measurement"/>.</param> /// <returns>A 32-bit signed integer that indicates the relative order of the objects being compared.</returns> /// <remarks>Measurement implementations should compare by hash code.</remarks> public int CompareTo(IMeasurement other) { if ((object)other != null) { return(GetHashCode().CompareTo(other.GetHashCode())); } return(1); }
/// <summary> /// Compares the <see cref="Measurement"/> with an <see cref="IMeasurement"/>. /// </summary> /// <param name="other">The <see cref="IMeasurement"/> to compare with the current <see cref="Measurement"/>.</param> /// <returns>A 32-bit signed integer that indicates the relative order of the objects being compared.</returns> /// <remarks>Measurement implementations should compare by hash code.</remarks> public int CompareTo(IMeasurement other) { if ((object)other != null) return GetHashCode().CompareTo(other.GetHashCode()); return 1; }