Partager via


SyntaxFactory.SwitchStatement Method

Definition

Overloads

SwitchStatement(ExpressionSyntax)

Creates a new SwitchStatementSyntax instance.

SwitchStatement(ExpressionSyntax, SyntaxList<SwitchSectionSyntax>)

Creates a new SwitchStatementSyntax instance.

SwitchStatement(SyntaxToken, SyntaxToken, ExpressionSyntax, SyntaxToken, SyntaxToken, SyntaxList<SwitchSectionSyntax>, SyntaxToken)

Creates a new SwitchStatementSyntax instance.

SwitchStatement(SyntaxList<AttributeListSyntax>, SyntaxToken, SyntaxToken, ExpressionSyntax, SyntaxToken, SyntaxToken, SyntaxList<SwitchSectionSyntax>, SyntaxToken)

Creates a new SwitchStatementSyntax instance.

SwitchStatement(ExpressionSyntax)

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

Creates a new SwitchStatementSyntax instance.

public:
 static Microsoft::CodeAnalysis::CSharp::Syntax::SwitchStatementSyntax ^ SwitchStatement(Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^ expression);
public static Microsoft.CodeAnalysis.CSharp.Syntax.SwitchStatementSyntax SwitchStatement (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression);
static member SwitchStatement : Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.SwitchStatementSyntax
Public Shared Function SwitchStatement (expression As ExpressionSyntax) As SwitchStatementSyntax

Parameters

expression
ExpressionSyntax

Returns

Applies to

SwitchStatement(ExpressionSyntax, SyntaxList<SwitchSectionSyntax>)

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

Creates a new SwitchStatementSyntax instance.

public:
 static Microsoft::CodeAnalysis::CSharp::Syntax::SwitchStatementSyntax ^ SwitchStatement(Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^ expression, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::CSharp::Syntax::SwitchSectionSyntax ^> sections);
public static Microsoft.CodeAnalysis.CSharp.Syntax.SwitchStatementSyntax SwitchStatement (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.SwitchSectionSyntax> sections);
static member SwitchStatement : Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.SwitchSectionSyntax> -> Microsoft.CodeAnalysis.CSharp.Syntax.SwitchStatementSyntax
Public Shared Function SwitchStatement (expression As ExpressionSyntax, sections As SyntaxList(Of SwitchSectionSyntax)) As SwitchStatementSyntax

Parameters

expression
ExpressionSyntax

Returns

Applies to

SwitchStatement(SyntaxToken, SyntaxToken, ExpressionSyntax, SyntaxToken, SyntaxToken, SyntaxList<SwitchSectionSyntax>, SyntaxToken)

Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.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:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs
Source:
SwitchStatementSyntax.cs

Creates a new SwitchStatementSyntax instance.

public:
 static Microsoft::CodeAnalysis::CSharp::Syntax::SwitchStatementSyntax ^ SwitchStatement(Microsoft::CodeAnalysis::SyntaxToken switchKeyword, Microsoft::CodeAnalysis::SyntaxToken openParenToken, Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^ expression, Microsoft::CodeAnalysis::SyntaxToken closeParenToken, Microsoft::CodeAnalysis::SyntaxToken openBraceToken, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::CSharp::Syntax::SwitchSectionSyntax ^> sections, Microsoft::CodeAnalysis::SyntaxToken closeBraceToken);
public static Microsoft.CodeAnalysis.CSharp.Syntax.SwitchStatementSyntax SwitchStatement (Microsoft.CodeAnalysis.SyntaxToken switchKeyword, Microsoft.CodeAnalysis.SyntaxToken openParenToken, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, Microsoft.CodeAnalysis.SyntaxToken closeParenToken, Microsoft.CodeAnalysis.SyntaxToken openBraceToken, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.SwitchSectionSyntax> sections, Microsoft.CodeAnalysis.SyntaxToken closeBraceToken);
static member SwitchStatement : Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.SwitchSectionSyntax> * Microsoft.CodeAnalysis.SyntaxToken -> Microsoft.CodeAnalysis.CSharp.Syntax.SwitchStatementSyntax
Public Shared Function SwitchStatement (switchKeyword As SyntaxToken, openParenToken As SyntaxToken, expression As ExpressionSyntax, closeParenToken As SyntaxToken, openBraceToken As SyntaxToken, sections As SyntaxList(Of SwitchSectionSyntax), closeBraceToken As SyntaxToken) As SwitchStatementSyntax

Parameters

switchKeyword
SyntaxToken
openParenToken
SyntaxToken
expression
ExpressionSyntax
closeParenToken
SyntaxToken
openBraceToken
SyntaxToken
closeBraceToken
SyntaxToken

Returns

Applies to

SwitchStatement(SyntaxList<AttributeListSyntax>, SyntaxToken, SyntaxToken, ExpressionSyntax, SyntaxToken, SyntaxToken, SyntaxList<SwitchSectionSyntax>, SyntaxToken)

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 SwitchStatementSyntax instance.

public static Microsoft.CodeAnalysis.CSharp.Syntax.SwitchStatementSyntax SwitchStatement (Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxToken switchKeyword, Microsoft.CodeAnalysis.SyntaxToken openParenToken, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, Microsoft.CodeAnalysis.SyntaxToken closeParenToken, Microsoft.CodeAnalysis.SyntaxToken openBraceToken, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.SwitchSectionSyntax> sections, Microsoft.CodeAnalysis.SyntaxToken closeBraceToken);
static member SwitchStatement : Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.SwitchSectionSyntax> * Microsoft.CodeAnalysis.SyntaxToken -> Microsoft.CodeAnalysis.CSharp.Syntax.SwitchStatementSyntax
Public Shared Function SwitchStatement (attributeLists As SyntaxList(Of AttributeListSyntax), switchKeyword As SyntaxToken, openParenToken As SyntaxToken, expression As ExpressionSyntax, closeParenToken As SyntaxToken, openBraceToken As SyntaxToken, sections As SyntaxList(Of SwitchSectionSyntax), closeBraceToken As SyntaxToken) As SwitchStatementSyntax

Parameters

switchKeyword
SyntaxToken
openParenToken
SyntaxToken
expression
ExpressionSyntax
closeParenToken
SyntaxToken
openBraceToken
SyntaxToken
closeBraceToken
SyntaxToken

Returns

Applies to