System.Linq.Expressions.TryExpression Class

Represents a try/catch/finally/fault block.

See Also: TryExpression Members

Syntax

[System.Diagnostics.DebuggerTypeProxy(typeof(System.Linq.Expressions.Expression/TryExpressionProxy))]
public sealed class TryExpression : Expression

Remarks

The body block is protected by the try block.

The handlers consist of a set of System.Linq.Expressions.CatchBlock expressions that can be either catch statements or filters.

The fault block runs if an exception is thrown.

The finally block runs regardless of how control exits the body.

Only one of fault or finally blocks can be supplied.

The return type of the try block must match the return type of any associated catch statements.

Requirements

Namespace: System.Linq.Expressions
Assembly: System.Core (in System.Core.dll)
Assembly Versions: 4.0.0.0