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;
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).
Exception Type | Condition |
---|---|
AccessException | The caller does not have access to the method represented by the Delegate; for instance, if the method is private. (?) |
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.
Delegate Class | Delegate Members | System Namespace | RemoveImpl | Equals