CxStatementIf

Description

sealed class Tinman.Core.Cx.Statements.CxStatementIf

A statement that selectively executes a body statement, based on the result of a condition expression:

if (a)
  b = 1;

if (a)
  b = 1;
else
  b = 2;

ICxExpressionContainer.Expression returns the condition of if statement.

Public / Constructors

Cx​Statement​If


public constructor CxStatementIf → (3)

expression in : CxExpression

[not-null]
See ICxExpressionContainer.Expression.

statementTrue in : CxStatement

[not-null]
See StatementTrue.

statementFalse opt : CxStatement = null

See StatementFalse.

Creates a new instance of CxStatementIf.

Public / Attributes

Statement​False


[Constant]
public attribute StatementFalse → (get)

value : CxStatement

The statement to execute if the condition is false or null if no statement shall be executed in this case.

Returns the statement to execute when the condition is false.

Statement​True


[Constant]
public attribute StatementTrue → (get)

value : CxStatement

[not-null]
The statement to execute if the condition is true.

Returns the statement to execute when the condition is true.