METHOD

Delegate.Remove

Returns a delegate with the last matching contiguous invocation-list sequence removed. No match leaves the source unchanged; removing every entry returns null. Types must be compatible.

Formal Syntax & Structure

csharp syntaxcsharp
Delegate.Remove(source, value)

Working Example

Example Snippetcsharp
using System;using System.Threading;using System.Threading.Tasks;Action a = () => {}; Console.WriteLine(Delegate.Remove(a, a) is null); // True
C# & .NET Reference