DelegateExtensionsRemoveAll Method

Removes all occurrences of the invocation list of the source Delegate from the invocation list of another Delegate.

Definition

Namespace: DevCase.Extensions.DelegateExtensions
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static Delegate RemoveAll(
	this Delegate source,
	Delegate target
)

Parameters

source  Delegate
The source Delegate from which to remove the invocation list of.
target  Delegate
The Delegate that supplies the invocation list to remove from the invocation list of.

Return Value

Delegate
A new delegate with an invocation list formed by taking the invocation list of source and removing all occurrences of the invocation list of target, if the invocation list of value is found within the invocation list of source.

Returns source if value is or if the invocation list of target is not found within the invocation list of source.

Returns a null reference if the invocation list of target is equal to the invocation list of source, if source contains only a series of invocation lists that are equal to the invocation list of source, or if source is a null reference.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Delegate. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also