Пример #1
0
 /// <summary>
 /// Returns a value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.
 /// </summary>
 /// <param name="obj">The object to compare with this instance.</param>
 /// <returns>A value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.</returns>
 int IComparable.CompareTo(object obj)
 {
     return(ComparableImplementations.ImplementCompareTo(DefaultComparer, this, obj));
 }
Пример #2
0
 /// <summary>
 /// Returns a value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.
 /// </summary>
 /// <param name="other">The object to compare with this instance.</param>
 /// <returns>A value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.</returns>
 public int CompareTo(T other)
 {
     return(ComparableImplementations.ImplementCompareTo(DefaultComparer, (T)this, other));
 }
Пример #3
0
 /// <summary>
 /// Returns a value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.
 /// </summary>
 /// <param name="obj">The object to compare with this instance.</param>
 /// <returns>A value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.</returns>
 int IComparable.CompareTo(object obj) => ComparableImplementations.ImplementCompareTo(DefaultComparer, this, obj);
Пример #4
0
 /// <summary>
 /// Returns a value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.
 /// </summary>
 /// <param name="other">The object to compare with this instance.</param>
 /// <returns>A value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.</returns>
 public int CompareTo(T other) => ComparableImplementations.ImplementCompareTo(DefaultComparer, (T)this, other);
 /// <inheritdoc />
 int IComparable <IUniformResourceIdentifier> .CompareTo(IUniformResourceIdentifier other) => ComparableImplementations.ImplementCompareTo(DefaultComparer, this, other);
Пример #6
0
 public override int CompareTo(object obj) => ComparableImplementations.ImplementCompareTo(DefaultComparer, this, obj);
Пример #7
0
 public int CompareTo(Derived2 other) => ComparableImplementations.ImplementCompareTo(DefaultComparer, this, other);
 /// <summary>
 /// Returns a value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.
 /// </summary>
 /// <param name="other">The object to compare with this instance.</param>
 /// <returns>A value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.</returns>
 public int CompareTo(T other)
 {
     Contract.Assume(DefaultComparer != null);
     return(ComparableImplementations.ImplementCompareTo(DefaultComparer, (T)this, other));
 }
 /// <summary>
 /// Returns a value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.
 /// </summary>
 /// <param name="obj">The object to compare with this instance.</param>
 /// <returns>A value indicating the relative order of this instance and the specified object: a negative value if this instance is less than the specified object; zero if this instance is equal to the specified object; and a positive value if this instance is greater than the specified object.</returns>
 int IComparable.CompareTo(object obj)
 {
     Contract.Assume(DefaultComparer != null);
     return(ComparableImplementations.ImplementCompareTo(DefaultComparer, this, obj));
 }