BlockLiteral.GetTarget<T>(IntPtr) Method

Definition

Returns the managed delegate represented by the specified block.

public static T GetTarget<T>(IntPtr block) where T : MulticastDelegate;
public static T? GetTarget<T>(IntPtr block) where T : MulticastDelegate;
static member GetTarget : nativeint -> 'T (requires 'T :> MulticastDelegate)

Type Parameters

T

The type of the managed delegate to return.

Parameters

block
IntPtr

nativeint

The pointer to the native block.

Returns

T

The managed delegate for this block, or null if no managed delegate is available.

Remarks

Behavior is undefined if this block does not represent a managed delegate.

Applies to