Język

Expression.GetDelegateType(Type[]) Metoda

Definicja

Type Pobiera obiekt reprezentujący typ ogólny Func<TResult> lub Action delegowany, który ma określone argumenty typu.

public:
 static Type ^ GetDelegateType(... cli::array <Type ^> ^ typeArgs);
public static Type GetDelegateType(params Type[] typeArgs);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Delegate creation requires dynamic code generation.")]
public static Type GetDelegateType(params Type[] typeArgs);
static member GetDelegateType : Type[] -> Type
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Delegate creation requires dynamic code generation.")>]
static member GetDelegateType : Type[] -> Type
Public Shared Function GetDelegateType (ParamArray typeArgs As Type()) As Type

Parametry

typeArgs
Type[]

Argumenty typu delegata.

Zwraca

Typ delegata.

Atrybuty

Uwagi

Ostatni argument typu określa zwracany typ delegata. Jeśli nie Func lub Action jest wystarczająco duży, wygeneruje niestandardowy typ delegata.

Podobnie jak w przypadku Func, ostatnim argumentem jest typ zwracany. Można go ustawić na System.Void wartość w celu utworzenia elementu Action.

Dotyczy