Share via


ForStatementAst Constructor

Definition

Construct a for statement.

public:
 ForStatementAst(System::Management::Automation::Language::IScriptExtent ^ extent, System::String ^ label, System::Management::Automation::Language::PipelineBaseAst ^ initializer, System::Management::Automation::Language::PipelineBaseAst ^ condition, System::Management::Automation::Language::PipelineBaseAst ^ iterator, System::Management::Automation::Language::StatementBlockAst ^ body);
public ForStatementAst (System.Management.Automation.Language.IScriptExtent extent, string label, System.Management.Automation.Language.PipelineBaseAst initializer, System.Management.Automation.Language.PipelineBaseAst condition, System.Management.Automation.Language.PipelineBaseAst iterator, System.Management.Automation.Language.StatementBlockAst body);
new System.Management.Automation.Language.ForStatementAst : System.Management.Automation.Language.IScriptExtent * string * System.Management.Automation.Language.PipelineBaseAst * System.Management.Automation.Language.PipelineBaseAst * System.Management.Automation.Language.PipelineBaseAst * System.Management.Automation.Language.StatementBlockAst -> System.Management.Automation.Language.ForStatementAst
Public Sub New (extent As IScriptExtent, label As String, initializer As PipelineBaseAst, condition As PipelineBaseAst, iterator As PipelineBaseAst, body As StatementBlockAst)

Parameters

extent
IScriptExtent

The extent of the statement, from the label or for keyword to the closing curly.

label
String

The optionally null label.

initializer
PipelineBaseAst

The optionally null initialization expression executed before the loop.

condition
PipelineBaseAst

The optionally null condition expression tested on each iteration of the loop.

iterator
PipelineBaseAst

The optionally null iteration expression executed after each iteration of the loop.

body
StatementBlockAst

The body executed on each iteration of the loop.

Exceptions

If extent is null.

Applies to