Język

Expression.TryGetFuncType(Type[], Type) Metoda

Definicja

Tworzy Type obiekt reprezentujący ogólny typ delegata System.Func, który ma określone argumenty typu. Ostatni argument typu określa zwracany typ utworzonego delegata.

public:
 static bool TryGetFuncType(cli::array <Type ^> ^ typeArgs, [Runtime::InteropServices::Out] Type ^ % funcType);
public static bool TryGetFuncType(Type[] typeArgs, out Type funcType);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Delegate creation requires dynamic code generation.")]
public static bool TryGetFuncType(Type[] typeArgs, out Type? funcType);
public static bool TryGetFuncType(Type[] typeArgs, out Type? funcType);
static member TryGetFuncType : Type[] * Type -> bool
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Delegate creation requires dynamic code generation.")>]
static member TryGetFuncType : Type[] * Type -> bool
Public Shared Function TryGetFuncType (typeArgs As Type(), ByRef funcType As Type) As Boolean

Parametry

typeArgs
Type[]

Tablica obiektów typu określających argumenty typu dla typu delegata System.Func.

funcType
Type

Gdy ta metoda zwraca, zawiera ogólny typ delegata System.Func, który ma określone argumenty typu. Zawiera wartość null, jeśli nie ma ogólnego delegata System.Func zgodnego z .typeArgs Ten parametr jest przekazywany niezainicjowany.

Zwraca

true jeśli ogólny typ delegata System.Func został utworzony dla określonego typeArgs; w przeciwnym razie , false.

Atrybuty

Dotyczy