SyntaxFactory.ForStatement Method

Definition

Overloads

ForStatement(VisualBasicSyntaxNode, ExpressionSyntax, ExpressionSyntax)

The For statement that begins a For-Next block. This statement always occurs as the Begin of a ForBlock. Most of the time, the End of that ForBlock is the corresponding Next statement. However, multiple nested For statements are ended by a single Next statement with multiple variables, then the inner For statements will have End set to Nothing, and the Next statement is the End of the outermost For statement that is being ended.

ForStatement(VisualBasicSyntaxNode, ExpressionSyntax, ExpressionSyntax, ForStepClauseSyntax)

The For statement that begins a For-Next block. This statement always occurs as the Begin of a ForBlock. Most of the time, the End of that ForBlock is the corresponding Next statement. However, multiple nested For statements are ended by a single Next statement with multiple variables, then the inner For statements will have End set to Nothing, and the Next statement is the End of the outermost For statement that is being ended.

ForStatement(SyntaxToken, VisualBasicSyntaxNode, SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax, ForStepClauseSyntax)

The For statement that begins a For-Next block. This statement always occurs as the Begin of a ForBlock. Most of the time, the End of that ForBlock is the corresponding Next statement. However, multiple nested For statements are ended by a single Next statement with multiple variables, then the inner For statements will have End set to Nothing, and the Next statement is the End of the outermost For statement that is being ended.

ForStatement(VisualBasicSyntaxNode, ExpressionSyntax, ExpressionSyntax)

Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb

The For statement that begins a For-Next block. This statement always occurs as the Begin of a ForBlock. Most of the time, the End of that ForBlock is the corresponding Next statement. However, multiple nested For statements are ended by a single Next statement with multiple variables, then the inner For statements will have End set to Nothing, and the Next statement is the End of the outermost For statement that is being ended.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::ForStatementSyntax ^ ForStatement(Microsoft::CodeAnalysis::VisualBasic::VisualBasicSyntaxNode ^ controlVariable, Microsoft::CodeAnalysis::VisualBasic::Syntax::ExpressionSyntax ^ fromValue, Microsoft::CodeAnalysis::VisualBasic::Syntax::ExpressionSyntax ^ toValue);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.ForStatementSyntax ForStatement (Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxNode controlVariable, Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax fromValue, Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax toValue);
static member ForStatement : Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxNode * Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.ForStatementSyntax
Public Shared Function ForStatement (controlVariable As VisualBasicSyntaxNode, fromValue As ExpressionSyntax, toValue As ExpressionSyntax) As ForStatementSyntax

Parameters

controlVariable
VisualBasicSyntaxNode

If the For or For Each statement is of a form that does not declare a new loop control variable, this is the expression that denotes the loop control variable. If this loop is of a form that does declare a new control variable, this is a VariableDeclarator that has the variable being declared.

fromValue
ExpressionSyntax

The expression denoting the initial value of the iteration.

toValue
ExpressionSyntax

The expression denoting the final value of the iteration.

Returns

Applies to

ForStatement(VisualBasicSyntaxNode, ExpressionSyntax, ExpressionSyntax, ForStepClauseSyntax)

Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb

The For statement that begins a For-Next block. This statement always occurs as the Begin of a ForBlock. Most of the time, the End of that ForBlock is the corresponding Next statement. However, multiple nested For statements are ended by a single Next statement with multiple variables, then the inner For statements will have End set to Nothing, and the Next statement is the End of the outermost For statement that is being ended.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::ForStatementSyntax ^ ForStatement(Microsoft::CodeAnalysis::VisualBasic::VisualBasicSyntaxNode ^ controlVariable, Microsoft::CodeAnalysis::VisualBasic::Syntax::ExpressionSyntax ^ fromValue, Microsoft::CodeAnalysis::VisualBasic::Syntax::ExpressionSyntax ^ toValue, Microsoft::CodeAnalysis::VisualBasic::Syntax::ForStepClauseSyntax ^ stepClause);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.ForStatementSyntax ForStatement (Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxNode controlVariable, Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax fromValue, Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax toValue, Microsoft.CodeAnalysis.VisualBasic.Syntax.ForStepClauseSyntax stepClause);
static member ForStatement : Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxNode * Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ForStepClauseSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.ForStatementSyntax
Public Shared Function ForStatement (controlVariable As VisualBasicSyntaxNode, fromValue As ExpressionSyntax, toValue As ExpressionSyntax, stepClause As ForStepClauseSyntax) As ForStatementSyntax

Parameters

controlVariable
VisualBasicSyntaxNode

If the For or For Each statement is of a form that does not declare a new loop control variable, this is the expression that denotes the loop control variable. If this loop is of a form that does declare a new control variable, this is a VariableDeclarator that has the variable being declared.

fromValue
ExpressionSyntax

The expression denoting the initial value of the iteration.

toValue
ExpressionSyntax

The expression denoting the final value of the iteration.

stepClause
ForStepClauseSyntax

The optional Step clause.

Returns

Applies to

ForStatement(SyntaxToken, VisualBasicSyntaxNode, SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax, ForStepClauseSyntax)

Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb
Source:
Syntax.xml.Main.Generated.vb

The For statement that begins a For-Next block. This statement always occurs as the Begin of a ForBlock. Most of the time, the End of that ForBlock is the corresponding Next statement. However, multiple nested For statements are ended by a single Next statement with multiple variables, then the inner For statements will have End set to Nothing, and the Next statement is the End of the outermost For statement that is being ended.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::ForStatementSyntax ^ ForStatement(Microsoft::CodeAnalysis::SyntaxToken forKeyword, Microsoft::CodeAnalysis::VisualBasic::VisualBasicSyntaxNode ^ controlVariable, Microsoft::CodeAnalysis::SyntaxToken equalsToken, Microsoft::CodeAnalysis::VisualBasic::Syntax::ExpressionSyntax ^ fromValue, Microsoft::CodeAnalysis::SyntaxToken toKeyword, Microsoft::CodeAnalysis::VisualBasic::Syntax::ExpressionSyntax ^ toValue, Microsoft::CodeAnalysis::VisualBasic::Syntax::ForStepClauseSyntax ^ stepClause);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.ForStatementSyntax ForStatement (Microsoft.CodeAnalysis.SyntaxToken forKeyword, Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxNode controlVariable, Microsoft.CodeAnalysis.SyntaxToken equalsToken, Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax fromValue, Microsoft.CodeAnalysis.SyntaxToken toKeyword, Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax toValue, Microsoft.CodeAnalysis.VisualBasic.Syntax.ForStepClauseSyntax stepClause);
static member ForStatement : Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.VisualBasicSyntaxNode * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.VisualBasic.Syntax.ForStepClauseSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.ForStatementSyntax
Public Shared Function ForStatement (forKeyword As SyntaxToken, controlVariable As VisualBasicSyntaxNode, equalsToken As SyntaxToken, fromValue As ExpressionSyntax, toKeyword As SyntaxToken, toValue As ExpressionSyntax, stepClause As ForStepClauseSyntax) As ForStatementSyntax

Parameters

forKeyword
SyntaxToken

The "For" keyword.

controlVariable
VisualBasicSyntaxNode

If the For or For Each statement is of a form that does not declare a new loop control variable, this is the expression that denotes the loop control variable. If this loop is of a form that does declare a new control variable, this is a VariableDeclarator that has the variable being declared.

equalsToken
SyntaxToken

The "=" token.

fromValue
ExpressionSyntax

The expression denoting the initial value of the iteration.

toKeyword
SyntaxToken

The "To" keyword.

toValue
ExpressionSyntax

The expression denoting the final value of the iteration.

stepClause
ForStepClauseSyntax

The optional Step clause.

Returns

Applies to