System.TimeSpan.Compare Method

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.

Syntax

public static int Compare (TimeSpan t1, TimeSpan t2)

Parameters

t1
The first time interval to compare.
t2
The second time interval to compare.

Returns

One of the following values.

-1

t1 is shorter than t2.

0

t1 is equal to t2.

1

t1 is longer than t2.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0