## Definición

Determina si dos instancias especificadas de DateTime no son iguales.Determines whether two specified instances of DateTime are not equal.

``````public:
static bool operator !=(DateTime d1, DateTime d2);``````
``public static bool operator != (DateTime d1, DateTime d2);``
``static member op_Inequality : DateTime * DateTime -> bool``
``Public Shared Operator != (d1 As DateTime, d2 As DateTime) As Boolean``

#### Parámetros

d1
DateTime

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

d2
DateTime

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

#### Devoluciones

Boolean

`true` si `d1` y `d2` no representan la misma fecha y hora; en caso contrario, `false`.`true` if `d1` and `d2` do not represent the same date and time; otherwise, `false`.

## Comentarios

El Inequality operador determina si dos DateTime valores no son iguales comparando su número de TICs.The Inequality operator determines whether two DateTime values are not equal by comparing their number of ticks. Antes de comparar DateTime objetos, asegúrese de que los objetos representan las horas de 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.

El método equivalente para este operador es DateTime.Equals(Object)The equivalent method for this operator is DateTime.Equals(Object)