System.DateTime.op_LessThan Method

Determines whether one specified DateTime is earlier than another specified DateTime.

Syntax

public static bool operator< (DateTime t1, DateTime t2)

See Also

DateTime.Compare(DateTime, DateTime)

Parameters

t1
The first object to compare.
t2
The second object to compare.

Returns

true if t1 is earlier than t2; otherwise, false.

Remarks

The DateTime.op_LessThan(DateTime, DateTime) operator determines the relationship between two DateTime values by comparing their number of ticks. Before comparing DateTime objects, make sure that the objects represent times in the same time zone. You can do this by comparing the values of their DateTime.Kind property.

Requirements

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