Expression that represent a switch (conditional statement with multiple branches).
Namespace: PostSharp.Reflection.MethodBody
Assembly: PostSharp.dll
Syntax
public interface ISwitchExpression : IExpression, IMethodBodyElementRemarks
<p>This interface represents the MSIL <code>switch</code> 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 <xref href="PostSharp.Reflection.MethodBody.ISwitchExpression.Targets" data-throw-if-not-resolved="false"></xref>.
Properties
| Name | Description |
|---|---|
| Condition | Gets the condition expression. |
| Targets | Gets the list of target blocks. |