Expression.MakeTry Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Crée un TryExpression bloc try représentant un bloc try avec les éléments spécifiés.
public:
static System::Linq::Expressions::TryExpression ^ MakeTry(Type ^ type, System::Linq::Expressions::Expression ^ body, System::Linq::Expressions::Expression ^ finally, System::Linq::Expressions::Expression ^ fault, System::Collections::Generic::IEnumerable<System::Linq::Expressions::CatchBlock ^> ^ handlers);
public static System.Linq.Expressions.TryExpression MakeTry(Type type, System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression finally, System.Linq.Expressions.Expression fault, System.Collections.Generic.IEnumerable<System.Linq.Expressions.CatchBlock> handlers);
static member MakeTry : Type * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression * seq<System.Linq.Expressions.CatchBlock> -> System.Linq.Expressions.TryExpression
Public Shared Function MakeTry (type As Type, body As Expression, finally As Expression, fault As Expression, handlers As IEnumerable(Of CatchBlock)) As TryExpression
Paramètres
- type
- Type
Type de résultat de l’expression try. Si la valeur est null, le corps et tous les gestionnaires doivent avoir un type identique.
- body
- Expression
Corps du bloc try.
- finally
- Expression
Corps du bloc final. Passez null si le bloc try n’a pas de bloc final associé à celui-ci.
- fault
- Expression
Corps du bloc d’erreur. Passez la valeur Null si le bloc try n’a pas de bloc d’erreur associé à celui-ci.
- handlers
- IEnumerable<CatchBlock>
Collection de CatchBlocks représentant les instructions catch à associer au bloc try.
Retours
Le fichier créé TryExpression.