SyntaxList Class

Builds SyntaxList<TNode> instances.

public static class SyntaxList

Methods

NameDescription
Create<TNode>(ReadOnlySpan<TNode>)Creates a detached list holding nodes.

Create<TNode>(ReadOnlySpan<TNode>)

SyntaxList.cs

Creates a detached list holding nodes.

public static SyntaxList<TNode> Create<TNode>(ReadOnlySpan<TNode> nodes) where TNode : SyntaxNode

Type parameters

TNode

Parameters

nodes ReadOnlySpan<TNode>

Returns

SyntaxList<TNode>

Remarks

This is what a collection expression targeting SyntaxList<TNode> builds its list with.