Delegate.Remove Method
Removes the last occurrence of a delegate's invocation list from another delegate's invocation list.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
[MethodImplAttribute]
public static Delegate Remove (
Delegatesource,
Delegatevalue
)
Parameters
- source
The delegate from which you want to remove the invocation list of value. - value
The delegate that supplies the invocation list you want 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 the invocation list of value, if the invocation list of value is found within the invocation list of source.
-or-
source, if value is a null reference or if the invocation list of value is not found within the invocation list of source.
-or-
A null reference, if the invocation list of value is equal to the invocation list of source, or if source is a null reference.
Remarks
If the invocation list of value matches a contiguous set of elements in the invocation list of source, the invocation list of value is said to occur within the invocation list of source. If the invocation list of value occurs more than once in the invocation list of source, the last occurrence of the repeated list is removed.
Version Information
Available in .NET Micro Framework version 2.0, 2.5