Expression.MakeTry 메서드

정의

지정된 요소를 사용하여 try 블록을 나타내는 TryExpression을 만듭니다.

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

매개 변수

type
Type

try 식의 결과 형식입니다. null일 경우 본문 및 모든 처리기에 같은 형식이 있어야 합니다.

body
Expression

try 블록의 본문입니다.

finally
Expression

finally 블록의 본문입니다. try 블록에 연결된 finally 블록이 없을 경우 null을 전달합니다.

fault
Expression

fault 블록의 본문입니다. try 블록에 연결된 fault 블록이 없을 경우 null을 전달합니다.

handlers
IEnumerable<CatchBlock>

try 블록과 연결되는 catch 문을 나타내는 CatchBlock의 컬렉션입니다.

반환

만든 TryExpression입니다.

적용 대상