Share via


Remove Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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)

Syntax

'Declaration
Public Shared Function Remove ( _
    source As Delegate, _
    value As Delegate _
) As Delegate
public static Delegate Remove(
    Delegate source,
    Delegate value
)
public:
static Delegate^ Remove(
    Delegate^ source, 
    Delegate^ value
)
static member Remove : 
        source:Delegate * 
        value:Delegate -> Delegate 
public static function Remove(
    source : Delegate, 
    value : Delegate
) : Delegate

Parameters

  • value
    Type: System. . :: . .Delegate
    The delegate that supplies the invocation list to remove from the invocation list of source.

Return Value

Type: System. . :: . .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 nullNothingnullptrunita null reference (Nothing in Visual Basic) 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.

Remarks

If the invocation list of value matches a contiguous set of elements in the invocation list of source, then 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 is removed.

.NET Framework Security

See Also

Reference

Delegate Class

System Namespace