#8887·csharplang

[Proposal]: Collection Expression Arguments (VS 18.8, .NET 11)

Author: CyrusNajmabadiCreated Dec 13, 2024Updated Aug 12, 2026
LabelsProposal championImplemented Needs ECMA Spec

Collection Expression Arguments

Summary

Introduce a way for users to create collection expressions (e.g. [a, b, c]) while also passing along arguments to the respective creation construction for that collection.

An example strawman syntax for this would be:

csharp
List<string> values = [args(capacity: 32); a, b, c];

Design meetings