Expression.MakeCatchBlock Methode

Definitie

Hiermee maakt u een CatchBlock catch-instructie met de opgegeven elementen.

public:
 static System::Linq::Expressions::CatchBlock ^ MakeCatchBlock(Type ^ type, System::Linq::Expressions::ParameterExpression ^ variable, System::Linq::Expressions::Expression ^ body, System::Linq::Expressions::Expression ^ filter);
public static System.Linq.Expressions.CatchBlock MakeCatchBlock(Type type, System.Linq.Expressions.ParameterExpression variable, System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression filter);
static member MakeCatchBlock : Type * System.Linq.Expressions.ParameterExpression * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression -> System.Linq.Expressions.CatchBlock
Public Shared Function MakeCatchBlock (type As Type, variable As ParameterExpression, body As Expression, filter As Expression) As CatchBlock

Parameters

type
Type

Exception CatchBlock Dit Type zal afhandelen.

variable
ParameterExpression

Een ParameterExpression vertegenwoordiging van een verwijzing naar het Exception object dat door deze handler is gevangen.

body
Expression

De hoofdtekst van de catch-instructie.

filter
Expression

De hoofdtekst van het Exception filter.

Retouren

De gemaakte CatchBlock.

Opmerkingen

type moet niet null zijn en overeenkomen met het type variable (als deze is opgegeven).

Van toepassing op