PostSharpAPI ReferencePost­Sharp.​Reflection.​Method­BodyISwitch­Expression
Open sandboxFocus

ISwitchExpression Interface

Expression that represent a switch (conditional statement with multiple branches).

Namespace: PostSharp.Reflection.MethodBody
Assembly: PostSharp.dll
Syntax
public interface ISwitchExpression : IExpression, IMethodBodyElement
Remarks

This interface represents the MSIL switch statement, not the C# statement. The main difference is that switch cases have no value: the value of a switch case is equal to its position in the list of Targets.

Properties

Name Description
Condition

Gets the condition expression.

Targets

Gets the list of target blocks.