METHOD

Delegate.GetInvocationList

Returns an array of individual delegates in invocation order. Inspect the entries without invoking the targets. A null delegate must be handled separately.

Formal Syntax & Structure

csharp syntaxcsharp
callback.GetInvocationList()

Working Example

Example Snippetcsharp
using System;using System.Threading;using System.Threading.Tasks;Action a = () => {}; a += () => {}; Console.WriteLine(a.GetInvocationList().Length); // 2
C# & .NET Reference