コード例 #1
0
 /// <summary>
 /// AtomicMeasureUnit are ordered by their <see cref="MeasureUnit.Abbreviation"/>.
 /// </summary>
 /// <param name="other">The other atomic unit. Can be null.</param>
 /// <returns>Standard comparison result (positive, zero or negative).</returns>
 public int CompareTo(AtomicMeasureUnit other)
 {
     return(other == null ? 1 : Abbreviation.CompareTo(other.Abbreviation));
 }
コード例 #2
0
 public int CompareTo(object other) => Abbreviation.CompareTo(((Enumeration)other).Abbreviation);