Bagikan melalui


Expression.MakeCatchBlock Metode

Definisi

Membuat pernyataan tangkapan yang CatchBlock mewakili dengan elemen yang ditentukan.

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);
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

Parameter

type
Type

Ini TypeExceptionCatchBlock akan menangani.

variable
ParameterExpression

mewakili ParameterExpression referensi ke objek yang Exception ditangkap oleh handler ini.

body
Expression

Tubuh pernyataan tangkapan.

filter
Expression

Isi Exception filter.

Mengembalikan

yang dibuat CatchBlock.

Keterangan

type harus non-null dan cocok dengan jenis variable (jika disediakan).

Berlaku untuk