Expression.TryGetFuncType(Type[], Type) 方法

定义

创建一个 Type 对象,该对象表示具有特定类型参数的泛型 System.Func 委托类型。 最后一个类型参数指定所创建的委托的返回类型。

public:
 static bool TryGetFuncType(cli::array <Type ^> ^ typeArgs, [Runtime::InteropServices::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

参数

typeArgs
Type[]

一个 Type 对象的数组,指定 System.Func 委托类型的类型参数。

funcType
Type

此方法返回时,包含具有特定类型参数的泛型 System.Func 委托类型。 如果没有与 <a0/a0> 匹配的泛型 System.Func 委托,则包含 null。 此参数未初始化传递。

返回

true 如果为特定 typeArgs类型创建了泛型 System.Func 委托类型,则为 ;否则为 false

适用于