Expression.TryGetFuncType(Type[], Type) Metod

Definition

Skapar ett Type objekt som representerar en allmän System.Func-ombudstyp som har specifika typargument. Det sista typargumentet anger returtypen för det skapade ombudet.

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

Parametrar

typeArgs
Type[]

En matris med typobjekt som anger typargumenten för ombudstypen System.Func.

funcType
Type

När den här metoden returneras innehåller den generiska ombudstypen System.Func som har specifika typargument. Innehåller null om det inte finns något allmänt System.Func-ombud som matchar typeArgs. Den här parametern skickas oinitierad.

Returer

trueom den generiska ombudstypen System.Func skapades för specifika typeArgs, annars . false

Attribut

Gäller för