DateTime.LessThanOrEqual(DateTime, DateTime) DateTime.LessThanOrEqual(DateTime, DateTime) DateTime.LessThanOrEqual(DateTime, DateTime) DateTime.LessThanOrEqual(DateTime, DateTime) Operator

Definición

Determina si un DateTime especificado representa una fecha y hora que es el igual o anterior a otro DateTime especificado.Determines whether one specified DateTime represents a date and time that is the same as or 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 igual o anterior a t2; de lo contrario, false.true if t1 is the same as or earlier than t2; otherwise, false.

Comentarios

El LessThanOrEqual operador determina la relación entre dos DateTime valores comparando su número de pasos.The LessThanOrEqual 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: