CodeConditionStatement 构造函数

定义

初始化 CodeConditionStatement 类的新实例。Initializes a new instance of the CodeConditionStatement class.

重载

CodeConditionStatement()

初始化 CodeConditionStatement 类的新实例。Initializes a new instance of the CodeConditionStatement class.

CodeConditionStatement(CodeExpression, CodeStatement[])

使用指定的条件和语句初始化 CodeConditionStatement 类的新实例。Initializes a new instance of the CodeConditionStatement class using the specified condition and statements.

CodeConditionStatement(CodeExpression, CodeStatement[], CodeStatement[])

使用指定的条件和语句初始化 CodeConditionStatement 类的新实例。Initializes a new instance of the CodeConditionStatement class using the specified condition and statements.

CodeConditionStatement()

初始化 CodeConditionStatement 类的新实例。Initializes a new instance of the CodeConditionStatement class.

public:
 CodeConditionStatement();
public CodeConditionStatement ();
Public Sub New ()

CodeConditionStatement(CodeExpression, CodeStatement[])

使用指定的条件和语句初始化 CodeConditionStatement 类的新实例。Initializes a new instance of the CodeConditionStatement class using the specified condition and statements.

public:
 CodeConditionStatement(System::CodeDom::CodeExpression ^ condition, ... cli::array <System::CodeDom::CodeStatement ^> ^ trueStatements);
public CodeConditionStatement (System.CodeDom.CodeExpression condition, params System.CodeDom.CodeStatement[] trueStatements);
new System.CodeDom.CodeConditionStatement : System.CodeDom.CodeExpression * System.CodeDom.CodeStatement[] -> System.CodeDom.CodeConditionStatement
Public Sub New (condition As CodeExpression, ParamArray trueStatements As CodeStatement())

参数

condition
CodeExpression

CodeExpression,指示要计算的表达式。A CodeExpression that indicates the expression to evaluate.

trueStatements
CodeStatement[]

CodeStatement 类型的数组,包含当条件为 true 时执行的语句。An array of type CodeStatement containing the statements to execute if the condition is true.

另请参阅

CodeConditionStatement(CodeExpression, CodeStatement[], CodeStatement[])

使用指定的条件和语句初始化 CodeConditionStatement 类的新实例。Initializes a new instance of the CodeConditionStatement class using the specified condition and statements.

public:
 CodeConditionStatement(System::CodeDom::CodeExpression ^ condition, cli::array <System::CodeDom::CodeStatement ^> ^ trueStatements, cli::array <System::CodeDom::CodeStatement ^> ^ falseStatements);
public CodeConditionStatement (System.CodeDom.CodeExpression condition, System.CodeDom.CodeStatement[] trueStatements, System.CodeDom.CodeStatement[] falseStatements);
new System.CodeDom.CodeConditionStatement : System.CodeDom.CodeExpression * System.CodeDom.CodeStatement[] * System.CodeDom.CodeStatement[] -> System.CodeDom.CodeConditionStatement
Public Sub New (condition As CodeExpression, trueStatements As CodeStatement(), falseStatements As CodeStatement())

参数

condition
CodeExpression

指示要计算的条件的 CodeExpressionA CodeExpression that indicates the condition to evaluate.

trueStatements
CodeStatement[]

CodeStatement 类型的数组,包含当条件为 true 时执行的语句。An array of type CodeStatement containing the statements to execute if the condition is true.

falseStatements
CodeStatement[]

CodeStatement 类型的数组,包含当条件为 false 时执行的语句。An array of type CodeStatement containing the statements to execute if the condition is false.

另请参阅

适用于