語言

Expression.GetFuncType(Type[]) 方法

定義

建立 Type 一個物件,代表具有特定類型參數的通用 Func<TResult> 代理型別。 最後一個型態參數指定所建立代理的回傳型態。

public:
 static Type ^ GetFuncType(... cli::array <Type ^> ^ typeArgs);
public static Type GetFuncType(params Type[] typeArgs);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Delegate creation requires dynamic code generation.")]
public static Type GetFuncType(params Type[]? typeArgs);
public static Type GetFuncType(params Type[]? typeArgs);
static member GetFuncType : Type[] -> Type
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Delegate creation requires dynamic code generation.")>]
static member GetFuncType : Type[] -> Type
Public Shared Function GetFuncType (ParamArray typeArgs As Type()) As Type

參數

typeArgs
Type[]

一個由 1 到 17 Type 個物件組成的陣列,指定代理型別的型別參數 System.Func 。

傳回

代表中具有指定型別參數的代理型別 Func<TResult> 。

屬性

例外狀況

typeArgs 包含少於一種或多於十七種元素。

typeArgs 是 null。

備註

typeArgs 必須包含至少一個元素,最多十七個元素。

舉例來說,若 的元素代表型別 ,則產生的 物件代表構造代理型別 ,或 Visual Basic 中的 。

適用於