Partager via


SyntaxFactory.SingleLineIfStatement Method

Definition

Overloads

SingleLineIfStatement(ExpressionSyntax)

Represents a single-line "If ... Then ... Else ..." statement.

SingleLineIfStatement(ExpressionSyntax, SyntaxList<StatementSyntax>, SingleLineElseClauseSyntax)

Represents a single-line "If ... Then ... Else ..." statement.

SingleLineIfStatement(SyntaxToken, ExpressionSyntax, SyntaxToken, SyntaxList<StatementSyntax>, SingleLineElseClauseSyntax)

Represents a single-line "If ... Then ... Else ..." statement.

SingleLineIfStatement(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

Represents a single-line "If ... Then ... Else ..." statement.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::SingleLineIfStatementSyntax ^ SingleLineIfStatement(Microsoft::CodeAnalysis::VisualBasic::Syntax::ExpressionSyntax ^ condition);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.SingleLineIfStatementSyntax SingleLineIfStatement (Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax condition);
static member SingleLineIfStatement : Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.SingleLineIfStatementSyntax
Public Shared Function SingleLineIfStatement (condition As ExpressionSyntax) As SingleLineIfStatementSyntax

Parameters

condition
ExpressionSyntax

The condition expression to be evaluated.

Returns

Applies to

SingleLineIfStatement(ExpressionSyntax, SyntaxList<StatementSyntax>, SingleLineElseClauseSyntax)

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

Represents a single-line "If ... Then ... Else ..." statement.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::SingleLineIfStatementSyntax ^ SingleLineIfStatement(Microsoft::CodeAnalysis::VisualBasic::Syntax::ExpressionSyntax ^ condition, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::StatementSyntax ^> statements, Microsoft::CodeAnalysis::VisualBasic::Syntax::SingleLineElseClauseSyntax ^ elseClause);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.SingleLineIfStatementSyntax SingleLineIfStatement (Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax condition, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.StatementSyntax> statements, Microsoft.CodeAnalysis.VisualBasic.Syntax.SingleLineElseClauseSyntax elseClause);
static member SingleLineIfStatement : Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.StatementSyntax> * Microsoft.CodeAnalysis.VisualBasic.Syntax.SingleLineElseClauseSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.SingleLineIfStatementSyntax
Public Shared Function SingleLineIfStatement (condition As ExpressionSyntax, statements As SyntaxList(Of StatementSyntax), elseClause As SingleLineElseClauseSyntax) As SingleLineIfStatementSyntax

Parameters

condition
ExpressionSyntax

The condition expression to be evaluated.

statements
SyntaxList<StatementSyntax>

A list of statements to be executed if the condition expression evaluates as true. Multiple statements must be separated by colons.

elseClause
SingleLineElseClauseSyntax

An "Else" clause to be executed if the condition expression evaluates as false.

Returns

Applies to

SingleLineIfStatement(SyntaxToken, ExpressionSyntax, SyntaxToken, SyntaxList<StatementSyntax>, SingleLineElseClauseSyntax)

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

Represents a single-line "If ... Then ... Else ..." statement.

public:
 static Microsoft::CodeAnalysis::VisualBasic::Syntax::SingleLineIfStatementSyntax ^ SingleLineIfStatement(Microsoft::CodeAnalysis::SyntaxToken ifKeyword, Microsoft::CodeAnalysis::VisualBasic::Syntax::ExpressionSyntax ^ condition, Microsoft::CodeAnalysis::SyntaxToken thenKeyword, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::VisualBasic::Syntax::StatementSyntax ^> statements, Microsoft::CodeAnalysis::VisualBasic::Syntax::SingleLineElseClauseSyntax ^ elseClause);
public static Microsoft.CodeAnalysis.VisualBasic.Syntax.SingleLineIfStatementSyntax SingleLineIfStatement (Microsoft.CodeAnalysis.SyntaxToken ifKeyword, Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax condition, Microsoft.CodeAnalysis.SyntaxToken thenKeyword, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.StatementSyntax> statements, Microsoft.CodeAnalysis.VisualBasic.Syntax.SingleLineElseClauseSyntax elseClause);
static member SingleLineIfStatement : Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.VisualBasic.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.VisualBasic.Syntax.StatementSyntax> * Microsoft.CodeAnalysis.VisualBasic.Syntax.SingleLineElseClauseSyntax -> Microsoft.CodeAnalysis.VisualBasic.Syntax.SingleLineIfStatementSyntax
Public Shared Function SingleLineIfStatement (ifKeyword As SyntaxToken, condition As ExpressionSyntax, thenKeyword As SyntaxToken, statements As SyntaxList(Of StatementSyntax), elseClause As SingleLineElseClauseSyntax) As SingleLineIfStatementSyntax

Parameters

ifKeyword
SyntaxToken

The "If" keyword.

condition
ExpressionSyntax

The condition expression to be evaluated.

thenKeyword
SyntaxToken

The "Then" keyword.

statements
SyntaxList<StatementSyntax>

A list of statements to be executed if the condition expression evaluates as true. Multiple statements must be separated by colons.

elseClause
SingleLineElseClauseSyntax

An "Else" clause to be executed if the condition expression evaluates as false.

Returns

Applies to