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

適用於