C# 15: Collection Expressions Finally Accept Arguments
C# 15 adds argument support to collection expressions, removing factory-method boilerplate for custom collection types.
Radar snapshot
The feature has no standalone business model and depends entirely on the .NET ecosystem, but it meaningfully cuts boilerplate for solo .NET builders maintaining custom collection types. How we score
Business breakdown
There is no direct monetization: this is a compiler/language feature shipped with .NET, so the value flows to Microsoft's platform ecosystem and to tooling vendors such as JetBrains and Visual Studio. Target users are .NET teams modernizing codebases, with indirect market opportunity through upgrade-driven tooling and support spend.
Use it if…
C# developers who maintain custom collection types and want less constructor and factory-method boilerplate.
Skip it if…
Developers outside the .NET ecosystem or teams pinned to older C# language versions.
Alternatives & competitors
| Option | Positioning | Pricing |
|---|---|---|
| Kotlin | Offers collection literals and buildList/buildSet builders, but no argument-carrying collection expression syntax. | free |
| Swift | Array and dictionary literals rely on protocol conformances like ExpressibleByArrayLiteral, without argument-passing expressions. | free |
What an indie dev can do with this
- Prototype the argument-taking collection expression on one custom type, such as a matrix or tree, in a scratch project before touching production code.
- Confirm your SDK preview and LangVersion settings support C# 15, and keep a fallback factory-method path for older targets.
- Measure the boilerplate removed in a real class, then update internal snippets and libraries so teammates adopt the pattern consistently.
FAQ
- Is C# 15 collection-expression argument support ready for production?
- It is tied to the C# 15 compiler, so treat it as preview until a stable SDK ships; keep the existing factory-method code path for production builds.
- Does this replace collection initializers?
- No. It complements them by letting collection expressions pass constructor or factory arguments, while initializer syntax remains valid and often clearer for simple cases.
- Do I need to upgrade my runtime to use it?
- Compiler features and runtime features ship separately, but argument-taking collection expressions depend on the C# 15 compiler; check the matching SDK and target framework before upgrading a whole so
Tags
#devtools #backend #productivity