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

定義

建立 Type 物件,這個物件代表具有特定型別引數的泛型 System.Action 委派類型。Creates a Type object that represents a generic System.Action delegate type that has specific type arguments.

public:
 static bool TryGetActionType(cli::array <Type ^> ^ typeArgs, [Runtime::InteropServices::Out] Type ^ % actionType);
public static bool TryGetActionType (Type[] typeArgs, out Type actionType);
public static bool TryGetActionType (Type[] typeArgs, out Type? actionType);
static member TryGetActionType : Type[] * Type -> bool
Public Shared Function TryGetActionType (typeArgs As Type(), ByRef actionType As Type) As Boolean

參數

typeArgs
Type[]

Type 物件的陣列,指定 System.Action 委派類型的類型引數。An array of Type objects that specify the type arguments for the System.Action delegate type.

actionType
Type

這個方法在傳回時會包含具有特定類型引數的泛型 System.Action 委派類型。When this method returns, contains the generic System.Action delegate type that has specific type arguments. 如果沒有符合的泛型 system.string,則包含 null typeArgsContains null if there is no generic System.Action delegate that matches the typeArgs. 這個參數會以未初始化的狀態傳遞。This parameter is passed uninitialized.

傳回

Boolean

如果已針對特定 typeArgs 建立泛型 System.Action 委派類型,則為 true;否則為 falsetrue if generic System.Action delegate type was created for specific typeArgs; otherwise, false.

適用於