Delegate.RemoveImpl Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Removes the invocation list of a delegate from the invocation list of another delegate.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
Protected Overridable Function RemoveImpl ( _
d As Delegate _
) As Delegate
protected virtual Delegate RemoveImpl(
Delegate d
)
Parameters
- d
Type: System..::.Delegate
The delegate that supplies the invocation list to remove from the invocation list of the current delegate.
Return Value
Type: System..::.Delegate
A new delegate with an invocation list formed by taking the invocation list of the current delegate and removing the invocation list of value, if the invocation list of value is found within the current delegate's invocation list. Returns the current delegate if value is nullNothingnullptra null reference (Nothing in Visual Basic) or if the invocation list of value is not found within the current delegate's invocation list. Returns nullNothingnullptra null reference (Nothing in Visual Basic) if the invocation list of value is equal to the current delegate's invocation list.
Exceptions
Exception | Condition |
---|---|
MemberAccessException | The caller does not have access to the method represented by the delegate (for example, if the method is private). |
MethodAccessException | Application code attempts to access this member late-bound, for example, by using the Type..::.InvokeMember method. |
Remarks
If the invocation list of value matches a contiguous set of elements in the current delegate's invocation list, then the invocation list of value is said to occur within the current delegate's invocation list. If the invocation list of value occurs more than once in the current delegate's invocation list, the last occurrence is removed.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1, 7.0
Platforms
Windows Phone