Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal]: Collection Expression Arguments #8887

Open
CyrusNajmabadi opened this issue Dec 13, 2024 · 1 comment
Open

[Proposal]: Collection Expression Arguments #8887

CyrusNajmabadi opened this issue Dec 13, 2024 · 1 comment
Assignees

Comments

@CyrusNajmabadi
Copy link
Member

CyrusNajmabadi commented Dec 13, 2024

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:

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

Design meetings

@dotnet dotnet locked and limited conversation to collaborators Dec 13, 2024
@CyrusNajmabadi

This comment has been minimized.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants