CompareTo() public méthode

Returns the result of comparing this instance to another Date.
public CompareTo ( Date other ) : int
other Date The Date instance to compare with.
Résultat int
 /// <summary>
 /// Compares two <see cref="Date"/> instances to determine if the
 /// first is equal to or smaller than the second.
 /// </summary>
 /// <param name="lhs">The first date.</param>
 /// <param name="rhs">The second date.</param>
 /// <returns><c>true</c> if the first value is less than the second.</returns>
 public static bool LessOrEqual(Date lhs, Date rhs)
 {
     return (lhs.CompareTo (rhs) <= 0);
 }
 /// <summary>
 /// Compares two <see cref="Date"/> instances to determine if the
 /// first is equal to or larger than the second.
 /// </summary>
 /// <param name="lhs">The first Date.</param>
 /// <param name="rhs">The second Date.</param>
 /// <returns><c>true</c> if the first value is greater than the second.</returns>
 public static bool GreaterOrEqual(Date lhs, Date rhs)
 {
     return (lhs.CompareTo (rhs) >= 0);
 }
 /// <summary>
 /// Determines if the value of a <see cref="Date"/> is less than
 /// the value of another.
 /// </summary>
 /// <param name="lhs">The <see cref="Date"/> to compare.</param>
 /// <param name="rhs">The <see cref="Date"/> to compare with.</param>
 /// <returns><c>true</c> if the first value is less than the second.</returns>
 public static bool Less(Date lhs, Date rhs)
 {
     return (lhs.CompareTo (rhs) < 0);
 }
 /// <summary>
 /// Determines if the value of a <see cref="Date"/> is greater than
 /// the value of another.
 /// </summary>
 /// <param name="lhs">The <see cref="Date"/> to compare.</param>
 /// <param name="rhs">The <see cref="Date"/> to compare with.</param>
 /// <returns><c>true</c> if the first value is greater than the second.</returns>
 public static bool Greater(Date lhs, Date rhs)
 {
     return (lhs.CompareTo (rhs) > 0);
 }