SyntaxFactory.SwitchExpression 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
SwitchExpression(ExpressionSyntax, SyntaxToken, SyntaxToken, SeparatedSyntaxList<SwitchExpressionArmSyntax>, SyntaxToken) |
建立新的 SwitchExpressionSyntax 實例。 |
SwitchExpression(ExpressionSyntax) |
建立新的 SwitchExpressionSyntax 實例。 |
SwitchExpression(ExpressionSyntax, SeparatedSyntaxList<SwitchExpressionArmSyntax>) |
建立新的 SwitchExpressionSyntax 實例。 |
SwitchExpression(ExpressionSyntax, SyntaxToken, SyntaxToken, SeparatedSyntaxList<SwitchExpressionArmSyntax>, SyntaxToken)
建立新的 SwitchExpressionSyntax 實例。
public static Microsoft.CodeAnalysis.CSharp.Syntax.SwitchExpressionSyntax SwitchExpression (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax governingExpression, Microsoft.CodeAnalysis.SyntaxToken switchKeyword, Microsoft.CodeAnalysis.SyntaxToken openBraceToken, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.SwitchExpressionArmSyntax> arms, Microsoft.CodeAnalysis.SyntaxToken closeBraceToken);
static member SwitchExpression : Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.SwitchExpressionArmSyntax> * Microsoft.CodeAnalysis.SyntaxToken -> Microsoft.CodeAnalysis.CSharp.Syntax.SwitchExpressionSyntax
Public Shared Function SwitchExpression (governingExpression As ExpressionSyntax, switchKeyword As SyntaxToken, openBraceToken As SyntaxToken, arms As SeparatedSyntaxList(Of SwitchExpressionArmSyntax), closeBraceToken As SyntaxToken) As SwitchExpressionSyntax
參數
- governingExpression
- ExpressionSyntax
- switchKeyword
- SyntaxToken
- openBraceToken
- SyntaxToken
- closeBraceToken
- SyntaxToken
傳回
適用於
SwitchExpression(ExpressionSyntax)
建立新的 SwitchExpressionSyntax 實例。
public static Microsoft.CodeAnalysis.CSharp.Syntax.SwitchExpressionSyntax SwitchExpression (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax governingExpression);
static member SwitchExpression : Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.SwitchExpressionSyntax
Public Shared Function SwitchExpression (governingExpression As ExpressionSyntax) As SwitchExpressionSyntax
參數
- governingExpression
- ExpressionSyntax
傳回
適用於
SwitchExpression(ExpressionSyntax, SeparatedSyntaxList<SwitchExpressionArmSyntax>)
建立新的 SwitchExpressionSyntax 實例。
public static Microsoft.CodeAnalysis.CSharp.Syntax.SwitchExpressionSyntax SwitchExpression (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax governingExpression, Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.SwitchExpressionArmSyntax> arms);
static member SwitchExpression : Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SeparatedSyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.SwitchExpressionArmSyntax> -> Microsoft.CodeAnalysis.CSharp.Syntax.SwitchExpressionSyntax
Public Shared Function SwitchExpression (governingExpression As ExpressionSyntax, arms As SeparatedSyntaxList(Of SwitchExpressionArmSyntax)) As SwitchExpressionSyntax
參數
- governingExpression
- ExpressionSyntax