ReflectionHelpers.CreateFuncOfType(Type, Func<Object>) Method

Definition

Creates a Func<TResult> delegate for a given Func<TResult> delegate.

public static Func<object> CreateFuncOfType (Type typeArg, Func<object> func);
static member CreateFuncOfType : Type * Func<obj> -> Func<obj>
Public Function CreateFuncOfType (typeArg As Type, func As Func(Of Object)) As Func(Of Object)

Parameters

typeArg
Type

The T type argument for the returned function's return type.

func
Func<Object>

The function that produces the T value typed as Object.

Returns

An instance of Func<TResult>, typed as Func<TResult>.

Applies to