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.Equals

Determines if the specified object and the singlecast Delegate share the same target, method and invocation list.

[Visual Basic]
Overrides Public Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);
[C++]
public: override bool Equals(
   Object* obj
);
[JScript]
public override function Equals(
   obj : Object
) : Boolean;

Parameters

obj
The Object to compare with the singlecast Delegate.

Return Value

true if obj and the current Delegate have the same target, method and invocation list; otherwise, false.

Exceptions

Exception Type Condition
AccessException The caller does not have access to the method represented by the Delegate; for instance, if the method is private. (?)

Remarks

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 | Object