Table of Contents

Class ForStatement

Namespace
ICSharpCode.Decompiler.CSharp.Syntax
Assembly
ICSharpCode.Decompiler.dll

for (Initializers; Condition; Iterators) EmbeddedStatement

public class ForStatement : Statement, IAnnotatable, IFreezable, INode, ICloneable
Inheritance
ForStatement
Implements
Inherited Members
Extension Methods

Constructors

ForStatement()

public ForStatement()

Fields

ForKeywordRole

public static readonly TokenRole ForKeywordRole

Field Value

TokenRole

InitializerRole

public static readonly Role<Statement> InitializerRole

Field Value

Role<Statement>

IteratorRole

public static readonly Role<Statement> IteratorRole

Field Value

Role<Statement>

Properties

Condition

public Expression Condition { get; set; }

Property Value

Expression

EmbeddedStatement

public Statement EmbeddedStatement { get; set; }

Property Value

Statement

ForToken

public CSharpTokenNode ForToken { get; }

Property Value

CSharpTokenNode

Initializers

Gets the list of initializer statements. Note: this contains multiple statements for "for (a = 2, b = 1; a > b; a--)", but contains only a single statement for "for (int a = 2, b = 1; a > b; a--)" (a single VariableDeclarationStatement with two variables)

public AstNodeCollection<Statement> Initializers { get; }

Property Value

AstNodeCollection<Statement>

Iterators

public AstNodeCollection<Statement> Iterators { get; }

Property Value

AstNodeCollection<Statement>

LParToken

public CSharpTokenNode LParToken { get; }

Property Value

CSharpTokenNode

RParToken

public CSharpTokenNode RParToken { get; }

Property Value

CSharpTokenNode

Methods

AcceptVisitor(IAstVisitor)

public override void AcceptVisitor(IAstVisitor visitor)

Parameters

visitor IAstVisitor

AcceptVisitor<T>(IAstVisitor<T>)

public override T AcceptVisitor<T>(IAstVisitor<T> visitor)

Parameters

visitor IAstVisitor<T>

Returns

T

Type Parameters

T

AcceptVisitor<T, S>(IAstVisitor<T, S>, T)

public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)

Parameters

visitor IAstVisitor<T, S>
data T

Returns

S

Type Parameters

T
S

DoMatch(AstNode, Match)

protected override bool DoMatch(AstNode other, Match match)

Parameters

other AstNode
match Match

Returns

bool