CompareTo() 공개 메소드

Returns the result of comparing this instance to another Date.
public CompareTo ( DateTime other ) : int
other DateTime The Date instance to compare with.
리턴 int
예제 #1
0
 /// <summary>
 /// Compares two <see cref="HandCoded.Finance.DateTime"/> instances to determine if the
 /// first is equal to or larger than the second.
 /// </summary>
 /// <param name="lhs">The first DateTime.</param>
 /// <param name="rhs">The second DateTime.</param>
 /// <returns><c>true</c> if the first value is greater than the second.</returns>
 public static bool GreaterOrEqual(HandCoded.Finance.DateTime lhs, HandCoded.Finance.DateTime rhs)
 {
     return(lhs.CompareTo(rhs) >= 0);
 }
예제 #2
0
 /// <summary>
 /// Determines if the value of a <see cref="HandCoded.Finance.DateTime"/> is less than
 /// the value of another.
 /// </summary>
 /// <param name="lhs">The <see cref="HandCoded.Finance.DateTime"/> to compare.</param>
 /// <param name="rhs">The <see cref="HandCoded.Finance.DateTime"/> to compare with.</param>
 /// <returns><c>true</c> if the first value is less than the second.</returns>
 public static bool Less(HandCoded.Finance.DateTime lhs, HandCoded.Finance.DateTime rhs)
 {
     return(lhs.CompareTo(rhs) < 0);
 }