## Definición

Determina si los delegados especificados no son iguales.Determines whether the specified delegates are not equal.

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

#### Parámetros

d1
Delegate

Primer delegado que se va a comparar.The first delegate to compare.

d2
Delegate

Segundo delegado que se va a comparar.The second delegate to compare.

#### Devoluciones

Boolean

Es `true` si `d1` no es igual a `d2`; en caso contrario, es `false`.`true` if `d1` is not equal to `d2`; otherwise, `false`.

## Comentarios

Dos delegados se consideran no iguales si son de tipos diferentes o tienen métodos diferentes, destinos diferentes o listas de invocación diferentes.Two delegates are considered not equal if they are of different types, or have different methods, different targets, or different invocation lists.

Si los dos delegados no son del mismo tipo, no se consideran iguales.If the two delegates are not of the same type, they are not considered equal.

Importante

En la .NET Framework versión 1,0 y 1,1, dos delegados se consideran iguales si sus destinos, métodos y listas de invocaciones eran iguales, aunque los delegados fueran de tipos diferentes.In the .NET Framework version 1.0 and 1.1, two delegates are considered equal if their targets, methods, and invocation list were equal, even if the delegates were of different types.

Los métodos y destinos se comparan para determinar si son iguales:The methods and targets are compared for equality as follows:

• Si los dos métodos que se comparan son estáticos y son el mismo método en la misma clase, los métodos se consideran iguales y los destinos también se consideran iguales.If the two methods being compared are both static and are the same method on the same class, the methods are considered equal and the targets are also considered equal.

• Si los dos métodos que se comparan son métodos de instancia y son el mismo método en el mismo objeto, los métodos se consideran iguales y los destinos también se consideran iguales.If the two methods being compared are instance methods and are the same method on the same object, the methods are considered equal and the targets are also considered equal.

• De lo contrario, los métodos no se consideran iguales y los destinos tampoco se consideran iguales.Otherwise, the methods are not considered to be equal and the targets are also not considered to be equal.

Dos listas de invocación no son iguales si tienen tamaños diferentes, si están ordenadas de forma diferente, o si al menos un elemento de una lista representa un método o destino distinto del representado por su elemento correspondiente en la otra lista.Two invocation lists are not equal if they have different sizes, if they are ordered differently, or if at least one element from one list represents a method or target that is different from that represented by its corresponding element in the other list.

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