LANGUAGE

Collection spread

Includes elements from another sequence in a collection expression.

Formal Syntax & Structure

csharp syntaxcsharp
int[] extended = [..values, 3];

Working Example

Example Snippetcsharp
// Documentary fragment; supply surrounding declarations as needed.int[] extended = [..values, 3];
C# & .NET Reference