Share via


SyntaxFactory.ForStatement Method

Definition

Overloads

ForStatement(SyntaxList<AttributeListSyntax>, SyntaxToken, SyntaxToken, VariableDeclarationSyntax, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken, ExpressionSyntax, SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken, StatementSyntax)

Creates a new ForStatementSyntax instance.

ForStatement(SyntaxToken, SyntaxToken, VariableDeclarationSyntax, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken, ExpressionSyntax, SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken, StatementSyntax)

Creates a new ForStatementSyntax instance.

ForStatement(VariableDeclarationSyntax, SeparatedSyntaxList<ExpressionSyntax>, ExpressionSyntax, SeparatedSyntaxList<ExpressionSyntax>, StatementSyntax)

Creates a new ForStatementSyntax instance.

ForStatement(StatementSyntax)

Creates a new ForStatementSyntax instance.

ForStatement(SyntaxList<AttributeListSyntax>, VariableDeclarationSyntax, SeparatedSyntaxList<ExpressionSyntax>, ExpressionSyntax, SeparatedSyntaxList<ExpressionSyntax>, StatementSyntax)

Creates a new ForStatementSyntax instance.

ForStatement(SyntaxList<AttributeListSyntax>, SyntaxToken, SyntaxToken, VariableDeclarationSyntax, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken, ExpressionSyntax, SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken, StatementSyntax)

Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs

Creates a new ForStatementSyntax instance.

public static Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax ForStatement (Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxToken forKeyword, Microsoft.CodeAnalysis.SyntaxToken openParenToken, Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax? declaration, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> initializers, Microsoft.CodeAnalysis.SyntaxToken firstSemicolonToken, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax? condition, Microsoft.CodeAnalysis.SyntaxToken secondSemicolonToken, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> incrementors, Microsoft.CodeAnalysis.SyntaxToken closeParenToken, Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax statement);
static member ForStatement : Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax * Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax
Public Shared Function ForStatement (attributeLists As SyntaxList(Of AttributeListSyntax), forKeyword As SyntaxToken, openParenToken As SyntaxToken, declaration As VariableDeclarationSyntax, initializers As SeparatedSyntaxList(Of ExpressionSyntax), firstSemicolonToken As SyntaxToken, condition As ExpressionSyntax, secondSemicolonToken As SyntaxToken, incrementors As SeparatedSyntaxList(Of ExpressionSyntax), closeParenToken As SyntaxToken, statement As StatementSyntax) As ForStatementSyntax

Parameters

forKeyword
SyntaxToken
openParenToken
SyntaxToken
firstSemicolonToken
SyntaxToken
condition
ExpressionSyntax
secondSemicolonToken
SyntaxToken
closeParenToken
SyntaxToken
statement
StatementSyntax

Returns

Applies to

ForStatement(SyntaxToken, SyntaxToken, VariableDeclarationSyntax, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken, ExpressionSyntax, SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken, StatementSyntax)

Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs

Creates a new ForStatementSyntax instance.

public:
 static Microsoft::CodeAnalysis::CSharp::Syntax::ForStatementSyntax ^ ForStatement(Microsoft::CodeAnalysis::SyntaxToken forKeyword, Microsoft::CodeAnalysis::SyntaxToken openParenToken, Microsoft::CodeAnalysis::CSharp::Syntax::VariableDeclarationSyntax ^ declaration, Microsoft::CodeAnalysis::SeparatedSyntaxList<Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^> initializers, Microsoft::CodeAnalysis::SyntaxToken firstSemicolonToken, Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^ condition, Microsoft::CodeAnalysis::SyntaxToken secondSemicolonToken, Microsoft::CodeAnalysis::SeparatedSyntaxList<Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^> incrementors, Microsoft::CodeAnalysis::SyntaxToken closeParenToken, Microsoft::CodeAnalysis::CSharp::Syntax::StatementSyntax ^ statement);
public static Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax ForStatement (Microsoft.CodeAnalysis.SyntaxToken forKeyword, Microsoft.CodeAnalysis.SyntaxToken openParenToken, Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax declaration, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> initializers, Microsoft.CodeAnalysis.SyntaxToken firstSemicolonToken, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax condition, Microsoft.CodeAnalysis.SyntaxToken secondSemicolonToken, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> incrementors, Microsoft.CodeAnalysis.SyntaxToken closeParenToken, Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax statement);
public static Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax ForStatement (Microsoft.CodeAnalysis.SyntaxToken forKeyword, Microsoft.CodeAnalysis.SyntaxToken openParenToken, Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax? declaration, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> initializers, Microsoft.CodeAnalysis.SyntaxToken firstSemicolonToken, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax? condition, Microsoft.CodeAnalysis.SyntaxToken secondSemicolonToken, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> incrementors, Microsoft.CodeAnalysis.SyntaxToken closeParenToken, Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax statement);
static member ForStatement : Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax * Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax
Public Shared Function ForStatement (forKeyword As SyntaxToken, openParenToken As SyntaxToken, declaration As VariableDeclarationSyntax, initializers As SeparatedSyntaxList(Of ExpressionSyntax), firstSemicolonToken As SyntaxToken, condition As ExpressionSyntax, secondSemicolonToken As SyntaxToken, incrementors As SeparatedSyntaxList(Of ExpressionSyntax), closeParenToken As SyntaxToken, statement As StatementSyntax) As ForStatementSyntax

Parameters

forKeyword
SyntaxToken
openParenToken
SyntaxToken
firstSemicolonToken
SyntaxToken
condition
ExpressionSyntax
secondSemicolonToken
SyntaxToken
closeParenToken
SyntaxToken
statement
StatementSyntax

Returns

Applies to

ForStatement(VariableDeclarationSyntax, SeparatedSyntaxList<ExpressionSyntax>, ExpressionSyntax, SeparatedSyntaxList<ExpressionSyntax>, StatementSyntax)

Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs
Source:
ForStatementSyntax.cs

Creates a new ForStatementSyntax instance.

public:
 static Microsoft::CodeAnalysis::CSharp::Syntax::ForStatementSyntax ^ ForStatement(Microsoft::CodeAnalysis::CSharp::Syntax::VariableDeclarationSyntax ^ declaration, Microsoft::CodeAnalysis::SeparatedSyntaxList<Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^> initializers, Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^ condition, Microsoft::CodeAnalysis::SeparatedSyntaxList<Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^> incrementors, Microsoft::CodeAnalysis::CSharp::Syntax::StatementSyntax ^ statement);
public static Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax ForStatement (Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax declaration, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> initializers, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax condition, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> incrementors, Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax statement);
public static Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax ForStatement (Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax? declaration, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> initializers, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax? condition, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> incrementors, Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax statement);
static member ForStatement : Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax * Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> * Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax
Public Shared Function ForStatement (declaration As VariableDeclarationSyntax, initializers As SeparatedSyntaxList(Of ExpressionSyntax), condition As ExpressionSyntax, incrementors As SeparatedSyntaxList(Of ExpressionSyntax), statement As StatementSyntax) As ForStatementSyntax

Parameters

condition
ExpressionSyntax
statement
StatementSyntax

Returns

Applies to

ForStatement(StatementSyntax)

Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs

Creates a new ForStatementSyntax instance.

public:
 static Microsoft::CodeAnalysis::CSharp::Syntax::ForStatementSyntax ^ ForStatement(Microsoft::CodeAnalysis::CSharp::Syntax::StatementSyntax ^ statement);
public static Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax ForStatement (Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax statement);
static member ForStatement : Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax
Public Shared Function ForStatement (statement As StatementSyntax) As ForStatementSyntax

Parameters

statement
StatementSyntax

Returns

Applies to

ForStatement(SyntaxList<AttributeListSyntax>, VariableDeclarationSyntax, SeparatedSyntaxList<ExpressionSyntax>, ExpressionSyntax, SeparatedSyntaxList<ExpressionSyntax>, StatementSyntax)

Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs

Creates a new ForStatementSyntax instance.

public static Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax ForStatement (Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax? declaration, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> initializers, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax? condition, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> incrementors, Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax statement);
static member ForStatement : Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax * Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax> * Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.ForStatementSyntax
Public Shared Function ForStatement (attributeLists As SyntaxList(Of AttributeListSyntax), declaration As VariableDeclarationSyntax, initializers As SeparatedSyntaxList(Of ExpressionSyntax), condition As ExpressionSyntax, incrementors As SeparatedSyntaxList(Of ExpressionSyntax), statement As StatementSyntax) As ForStatementSyntax

Parameters

condition
ExpressionSyntax
statement
StatementSyntax

Returns

Applies to