Delegate::RemoveImpl Method
Removes the invocation list of a delegate from the invocation list of another delegate.
Assembly: mscorlib (in mscorlib.dll)
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::DelegateA 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 nullptr or if the invocation list of value is not found within the current delegate's invocation list. Returns nullptr if the invocation list of value is equal to the current delegate's invocation list.
| Exception | Condition |
|---|---|
| MemberAccessException | The caller does not have access to the method represented by the delegate (for example, if the method is private). |
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.
- ReflectionPermission
when invoked late-bound through mechanisms such as Type::InvokeMember. Associated enumeration: ReflectionPermissionFlag::MemberAccess
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.