Click or drag to resize

IIfStatement Interface



Represents an if statement in C# or an If statement in VB.

Namespace:  Microsoft.CodeAnalysis.Semantics
Assembly:  Microsoft.CodeAnalysis (in Microsoft.CodeAnalysis.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public interface IIfStatement : IOperation

The IIfStatement type exposes the following members.

Properties
  NameDescription
Public propertyCondition
Condition of the if statement. For C# there is naturally one clause per if, but for VB If statements with multiple clauses are rewritten to have only one.
Public propertyConstantValue
If the operation is an expression that evaluates to a constant value, HasValue is true and Value is the value of the expression. Otherwise, HasValue is false.
(Inherited from IOperation.)
Public propertyIfFalseStatement
Statement executed if the condition is false.
Public propertyIfTrueStatement
Statement executed if the condition is true.
Public propertyIsInvalid
Indicates whether the operation is invalid, either semantically or syntactically.
(Inherited from IOperation.)
Public propertyKind
Identifies the kind of the operation.
(Inherited from IOperation.)
Public propertySyntax
Syntax that was analyzed to produce the operation.
(Inherited from IOperation.)
Public propertyType
Result type of the operation, or null if the operation does not produce a result.
(Inherited from IOperation.)
Top
Methods
Remarks
This interface is reserved for implementation by its associated APIs. We reserve the right to change it in the future.
See Also