DateTime.LessThan(DateTime, DateTime) DateTime.LessThan(DateTime, DateTime) DateTime.LessThan(DateTime, DateTime) DateTime.LessThan(DateTime, DateTime) Operator

Definición

Determina si un DateTime especificado es anterior a otro DateTime especificado.Determines whether one specified DateTime is earlier than another specified DateTime.

public:
 static bool operator <(DateTime t1, DateTime t2);
public static bool operator < (DateTime t1, DateTime t2);
static member ( < ) : DateTime * DateTime -> bool
Public Shared Operator < (t1 As DateTime, t2 As DateTime) As Boolean

Parámetros

t1
DateTime DateTime DateTime DateTime

Primer objeto que se va a comparar.The first object to compare.

t2
DateTime DateTime DateTime DateTime

Segundo objeto que se va a comparar.The second object to compare.

Devoluciones

true si t1 es anterior a t2; en caso contrario, false.true if t1 is earlier than t2; otherwise, false.

Comentarios

El LessThan operador determina la relación entre dos DateTime valores comparando su número de pasos.The LessThan operator determines the relationship between two DateTime values by comparing their number of ticks. Antes de comparar DateTime objetos, asegúrese de que los objetos representan horas en la misma zona horaria.Before comparing DateTime objects, make sure that the objects represent times in the same time zone. Puede hacerlo comparando los valores de su propiedad Kind.You can do this by comparing the values of their Kind property.

Es el método equivalente para este operador DateTime.Compare(DateTime, DateTime)The equivalent method for this operator is DateTime.Compare(DateTime, DateTime)

Se aplica a

Consulte también: