Expression.GetFuncType(Type[]) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立 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
參數
傳回
代表中具有指定型別參數的代理型別 Func<TResult> 。
- 屬性
例外狀況
typeArgs 包含少於一種或多於十七種元素。
typeArgs 是 null。
備註
typeArgs 必須包含至少一個元素,最多十七個元素。
舉例來說,若