Mono Class Library: System.DateTime Overview | Members

System.DateTime.Compare Method

Returns the sort order of the two specified instances of DateTime . [Edit]

public static int Compare (DateTime t1, DateTime t2)

Parameters

t1
The first DateTime. [Edit]
t2
The second DateTime. [Edit]

Returns

The return value is a negative number, zero, or a positive number reflecting the sort order of the two specified instances of DateTime. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:

Value TypeCondition
Any negative numbert1 < t2.
Zerot1 == t2.
Any positive numbert1 > t2 .
[Edit]

Remarks

Documentation for this section has not yet been entered. [Edit]

Requirements

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