TimeSpanStatic: Compare

Compare

Compares two TimeSpan values and returns an integer that indicates whether the first value is shorter than, equal to, or longer than the second value.



 Public Function Compare(
	  ByRef t1 As TimeSpan,
	  ByRef t2 As TimeSpan ) As Long

Parameters

t1
[ByRef] TimeSpan. The first time interval to compare.
t2
[ByRef] TimeSpan. The second time interval to compare.

Return Values

Long -  One of the following values.
ValueDescription
-1t1 is shorter than t2.
0t1 is equal to t2.
1t1 is longer than t2.

See Also

Project CorLib Overview

Class TimeSpanStatic Overview