Skip to main content

SyntaxExtensions.Add(SyntaxList<StatementSyntax>, StatementSyntax, Boolean) Method

Containing Type: SyntaxExtensions

Assembly: Roslynator.CSharp.dll

Creates a new list with the specified node added or inserted.

public static Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax> Add(this Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax> statements, Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax statement, bool ignoreLocalFunctions)

Parameters

statements SyntaxList<StatementSyntax>

statement StatementSyntax

ignoreLocalFunctions Boolean

Insert statement before local function statements at the end of the list.

Returns

SyntaxList<StatementSyntax>