Skip to main content

SyntaxExtensions.DefaultSection(SwitchStatementSyntax) Method

Containing Type: SyntaxExtensions

Assembly: Roslynator.CSharp.dll

Returns a section that contains default label, or null if the specified switch statement does not contains section with default label.

public static Microsoft.CodeAnalysis.CSharp.Syntax.SwitchSectionSyntax? DefaultSection(this Microsoft.CodeAnalysis.CSharp.Syntax.SwitchStatementSyntax switchStatement)

Parameters

switchStatement SwitchStatementSyntax

Returns

SwitchSectionSyntax