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

Removes a Delegate from the invocation list of another Delegate.

[Visual Basic]
Public Shared Function Remove( _
   ByVal source As Delegate, _
   ByVal value As Delegate _
) As Delegate
[C#]
public static Delegate Remove(
   Delegate source,
   Delegate value
);
[C++]
public: static Delegate* Remove(
   Delegate* source,
   Delegate* value
);
[JScript]
public static function Remove(
   source : Delegate,
   value : Delegate
) : Delegate;

Parameters

source
The Delegate from which to remove value.
value
The Delegate to remove from the invocation list of source.

Return Value

A new Delegate with an invocation list formed by taking the invocation list of source and removing the last occurrence of value, if value is found in the invocation list of source.

source, if value is a null reference (in Visual Basic Nothing), or if value is not found in the invocation list of source.

a null reference (Nothing), if value is the only element in the invocation list of source, or if source is a null reference (Nothing).

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

The Delegate removed from the invocation list is the last delegate for which the following expression is true: value. Equals (delegate), where delegate is a member of source 's invocation list.

See Also

Delegate Class | Delegate Members | System Namespace | RemoveImpl | Equals