Delegate.EnumerateInvocationList<TDelegate>(TDelegate) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Parameters
- d
- TDelegate
Returns
Remarks
This method 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 order of the delegates returned by the enumerator is the same order in which the current delegate invokes the methods that those delegates represent. The method returns an empty enumerator for null
delegate.