System.CodeDom.CodeConditionStatement Class

Represents a conditional branch statement, typically represented as an if statement.

See Also: CodeConditionStatement Members

Syntax

[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
public class CodeConditionStatement : CodeStatement

Remarks

System.CodeDom.CodeConditionStatement can be used to represent code that consists of a conditional expression, a collection of statements to execute if the conditional expression evaluates to true, and an optional collection of statements to execute if the conditional expression evaluates to false. A System.CodeDom.CodeConditionStatement is generated in many languages as an if statement.

The CodeConditionStatement.Condition property indicates the expression to test. The CodeConditionStatement.TrueStatements property contains the statements to execute if the expression to test evaluates to true. The CodeConditionStatement.FalseStatements property contains the statements to execute if the expression to test evaluates to false.

Requirements

Namespace: System.CodeDom
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0, 4.0.0.0