SyntaxFactory.ForStatement Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
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
- attributeLists
- SyntaxList<AttributeListSyntax>
- forKeyword
- SyntaxToken
- openParenToken
- SyntaxToken
- declaration
- VariableDeclarationSyntax
- initializers
- SeparatedSyntaxList<ExpressionSyntax>
- firstSemicolonToken
- SyntaxToken
- condition
- ExpressionSyntax
- secondSemicolonToken
- SyntaxToken
- incrementors
- SeparatedSyntaxList<ExpressionSyntax>
- 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
- declaration
- VariableDeclarationSyntax
- initializers
- SeparatedSyntaxList<ExpressionSyntax>
- firstSemicolonToken
- SyntaxToken
- condition
- ExpressionSyntax
- secondSemicolonToken
- SyntaxToken
- incrementors
- SeparatedSyntaxList<ExpressionSyntax>
- 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
- declaration
- VariableDeclarationSyntax
- initializers
- SeparatedSyntaxList<ExpressionSyntax>
- condition
- ExpressionSyntax
- incrementors
- SeparatedSyntaxList<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
- attributeLists
- SyntaxList<AttributeListSyntax>
- declaration
- VariableDeclarationSyntax
- initializers
- SeparatedSyntaxList<ExpressionSyntax>
- condition
- ExpressionSyntax
- incrementors
- SeparatedSyntaxList<ExpressionSyntax>
- statement
- StatementSyntax
Returns
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.