Expression.GetDelegateType(Type[]) 方法

定义

获取一个 Type 对象,该对象表示具有特定类型参数的泛型 Func<TResult>Action 委托类型。

public:
 static Type ^ GetDelegateType(... cli::array <Type ^> ^ typeArgs);
public static Type GetDelegateType(params Type[] typeArgs);
static member GetDelegateType : Type[] -> Type
Public Shared Function GetDelegateType (ParamArray typeArgs As Type()) As Type

参数

typeArgs
Type[]

委托的类型参数。

返回

委托类型。

注解

最后一个类型参数确定委托的返回类型。 Func如果没有或Action足够大,它将生成自定义委托类型。

与上一样 Func,最后一个参数是返回类型。 它可以设置为 System.Void 生成一个 Action

适用于