NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Delegate Equality Operator

Determines if the specified Delegate objects are equal.

[C#]
public static bool operator ==(
   Delegate d1,
   Delegate d2
);
[C++]
public: static bool operator op_Equality(
   Delegate* d1,
   Delegate* d2
);
[JScript]
returnValue = d1 == d2;

[Visual Basic] In Visual Basic, you cannot use the operators defined by a type, nor override them or define your own.

[JScript] In JScript, you can use the operators defined by a type, but you cannot override them or define your own.

Arguments [JScript]

d1
The first Delegate to compare.
d2
The second Delegate to compare.

Parameters [C#, C++]

d1
The first Delegate to compare.
d2
The second Delegate to compare.

Return Value [C#, C++, JScript]

true if d1 is equal to d2; otherwise, false.

Remarks [C#, C++, JScript]

Two delegates with the same methods, the same targets and the same invocation lists are considered equal, even if they are not both singlecast or both multicast.

The methods and targets are compared for equality as follows:

Two invocation lists are considered identical if they have the same order and the corresponding elements from the two lists represent the same method and target.

See Also

Delegate Class | Delegate Members | System Namespace | Equals