Click or drag to resize
DelegateRemove Method
Removes the last occurrence of the invocation list of a delegate from the invocation list of another delegate.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static Delegate Remove(
	Delegate source,
	Delegate value
)

Parameters

source
Type: SystemDelegate
The delegate from which to remove the invocation list of value.
value
Type: SystemDelegate
The delegate that supplies the invocation list to remove from the invocation list of source.

Return Value

Type: Delegate
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. Returns source if value is null or if the invocation list of value is not found within the invocation list of source. Returns a null reference if the invocation list of value is equal to the invocation list of source or if source is a null reference.
Exceptions
ExceptionCondition
MemberAccessExceptionThe caller does not have access to the method represented by the delegate (for example, if the method is private).
ArgumentExceptionThe delegate types do not match.
See Also