Compares two TimeSpan values and returns an integer that indicates their relationship.
[Visual Basic] Public Shared Function Compare( _ ByVal t1 As TimeSpan, _ ByVal t2 As TimeSpan _ ) As Integer [C#] public static int Compare( TimeSpan t1, TimeSpan t2 ); [C++] public: static int Compare( TimeSpan t1, TimeSpan t2 ); [JScript] public static function Compare( t1 : TimeSpan, t2 : TimeSpan ) : int;
Value | Condition |
---|---|
-1 | If the first TimeSpan is less than the second TimeSpan. |
0 | If the first TimeSpan is equal to the second TimeSpan. |
1 | If the first TimeSpan is greater than the second TimeSpan. |
The return value is an integer of the relationship of the parameters based upon the evaluation of the following:
TimeSpan Structure | TimeSpan Members | System Namespace | Int64