Breyta

Deila með


Delegate.EnumerateInvocationList<TDelegate>(TDelegate) Method

Definition

Gets an enumerator for the invocation targets of this delegate.

public:
generic <typename TDelegate>
 where TDelegate : Delegate static Delegate::InvocationListEnumerator<TDelegate> EnumerateInvocationList(TDelegate d);
public static Delegate.InvocationListEnumerator<TDelegate> EnumerateInvocationList<TDelegate> (TDelegate? d) where TDelegate : Delegate;
static member EnumerateInvocationList : 'Delegate -> Delegate.InvocationListEnumerator<'Delegate (requires 'Delegate :> Delegate)> (requires 'Delegate :> Delegate)
Public Shared Function EnumerateInvocationList(Of TDelegate As Delegate) (d As TDelegate) As Delegate.InvocationListEnumerator(Of TDelegate)

Type Parameters

TDelegate

Delegate type being enumerated.

Parameters

d
TDelegate

The delegate being enumerated.

Returns

A Delegate.InvocationListEnumerator<TDelegate> that follows the IEnumerable pattern and thus can be used in a C# 'foreach' statement to retrieve the invocation targets of this delegate without allocations. The method returns an empty enumerator for null delegate.

Remarks

The order of the delegates returned by the enumerator is the same order in which the current delegate invokes the methods that those delegates represent.

Applies to