Expression.Catch Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Crea un oggetto CatchBlock che rappresenta un'istruzione catch.
Overload
| Nome | Descrizione |
|---|---|
| Catch(ParameterExpression, Expression) |
Crea un oggetto CatchBlock che rappresenta un'istruzione catch con un riferimento all'oggetto intercettato Exception da utilizzare nel corpo del gestore. |
| Catch(Type, Expression) |
Crea un oggetto CatchBlock che rappresenta un'istruzione catch. |
| Catch(ParameterExpression, Expression, Expression) |
Crea un oggetto CatchBlock che rappresenta un'istruzione catch con un Exception filtro e un riferimento all'oggetto intercettato Exception . |
| Catch(Type, Expression, Expression) |
Crea un oggetto CatchBlock che rappresenta un'istruzione catch con un Exception filtro, ma nessun riferimento all'oggetto intercettato Exception . |
Catch(ParameterExpression, Expression)
Crea un oggetto CatchBlock che rappresenta un'istruzione catch con un riferimento all'oggetto intercettato Exception da utilizzare nel corpo del gestore.
public:
static System::Linq::Expressions::CatchBlock ^ Catch(System::Linq::Expressions::ParameterExpression ^ variable, System::Linq::Expressions::Expression ^ body);
public static System.Linq.Expressions.CatchBlock Catch(System.Linq.Expressions.ParameterExpression variable, System.Linq.Expressions.Expression body);
static member Catch : System.Linq.Expressions.ParameterExpression * System.Linq.Expressions.Expression -> System.Linq.Expressions.CatchBlock
Public Shared Function Catch (variable As ParameterExpression, body As Expression) As CatchBlock
Parametri
- variable
- ParameterExpression
Oggetto ParameterExpression che rappresenta un riferimento all'oggetto Exception intercettato da questo gestore.
- body
- Expression
Corpo dell'istruzione catch.
Valori restituiti
Oggetto creato CatchBlock.
Si applica a
Catch(Type, Expression)
Crea un oggetto CatchBlock che rappresenta un'istruzione catch.
public:
static System::Linq::Expressions::CatchBlock ^ Catch(Type ^ type, System::Linq::Expressions::Expression ^ body);
public static System.Linq.Expressions.CatchBlock Catch(Type type, System.Linq.Expressions.Expression body);
static member Catch : Type * System.Linq.Expressions.Expression -> System.Linq.Expressions.CatchBlock
Public Shared Function Catch (type As Type, body As Expression) As CatchBlock
Parametri
- type
- Type
Di TypeException questo CatchBlock handle verrà gestito.
- body
- Expression
Corpo dell'istruzione catch.
Valori restituiti
Oggetto creato CatchBlock.
Commenti
L'oggetto Type di Exception da intercettato può essere specificato, ma non sarà disponibile alcun riferimento all'oggetto per l'utilizzo Exception in CatchBlock.
Si applica a
Catch(ParameterExpression, Expression, Expression)
Crea un oggetto CatchBlock che rappresenta un'istruzione catch con un Exception filtro e un riferimento all'oggetto intercettato Exception .
public:
static System::Linq::Expressions::CatchBlock ^ Catch(System::Linq::Expressions::ParameterExpression ^ variable, System::Linq::Expressions::Expression ^ body, System::Linq::Expressions::Expression ^ filter);
public static System.Linq.Expressions.CatchBlock Catch(System.Linq.Expressions.ParameterExpression variable, System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression filter);
static member Catch : System.Linq.Expressions.ParameterExpression * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression -> System.Linq.Expressions.CatchBlock
Public Shared Function Catch (variable As ParameterExpression, body As Expression, filter As Expression) As CatchBlock
Parametri
- variable
- ParameterExpression
Oggetto ParameterExpression che rappresenta un riferimento all'oggetto Exception intercettato da questo gestore.
- body
- Expression
Corpo dell'istruzione catch.
- filter
- Expression
Corpo del Exception filtro.
Valori restituiti
Oggetto creato CatchBlock.
Si applica a
Catch(Type, Expression, Expression)
Crea un oggetto CatchBlock che rappresenta un'istruzione catch con un Exception filtro, ma nessun riferimento all'oggetto intercettato Exception .
public:
static System::Linq::Expressions::CatchBlock ^ Catch(Type ^ type, System::Linq::Expressions::Expression ^ body, System::Linq::Expressions::Expression ^ filter);
public static System.Linq.Expressions.CatchBlock Catch(Type type, System.Linq.Expressions.Expression body, System.Linq.Expressions.Expression filter);
static member Catch : Type * System.Linq.Expressions.Expression * System.Linq.Expressions.Expression -> System.Linq.Expressions.CatchBlock
Public Shared Function Catch (type As Type, body As Expression, filter As Expression) As CatchBlock
Parametri
- type
- Type
Di TypeException questo CatchBlock handle verrà gestito.
- body
- Expression
Corpo dell'istruzione catch.
- filter
- Expression
Corpo del Exception filtro.
Valori restituiti
Oggetto creato CatchBlock.