Expression.TryGetFuncType(Type[], Type) Method

Definition

Creates a Type object that represents a generic System.Func delegate type that has specific type arguments. The last type argument specifies the return type of the created delegate.

public:
 static bool TryGetFuncType(cli::array <Type ^> ^ typeArgs, [Runtime::InteropServices::Out] Type ^ % funcType);
public static bool TryGetFuncType (Type[] typeArgs, out Type funcType);
public static bool TryGetFuncType (Type[] typeArgs, out Type? funcType);
static member TryGetFuncType : Type[] * Type -> bool
Public Shared Function TryGetFuncType (typeArgs As Type(), ByRef funcType As Type) As Boolean

Parameters

typeArgs
Type[]

An array of Type objects that specify the type arguments for the System.Func delegate type.

funcType
Type

When this method returns, contains the generic System.Func delegate type that has specific type arguments. Contains null if there is no generic System.Func delegate that matches the typeArgs. This parameter is passed uninitialized.

Returns

true if generic System.Func delegate type was created for specific typeArgs; otherwise, false.

Applies to