dotnet / dotnet/csharplang

[Proposal]: Target-typed implicit array creation expression `new[]`

Open
#8,993 1 comment 0 reactions 1 assignee Claimed by @jcouv View on GitHub
Proposal champion
Dominant language
C#
Stars
12.7k
Forks
1.1k
Avg merge
11h 1m
Merged PRs (30d)
3

Description

# Target-typed implicit array creation expression `new[]`

* Specification: In the discussion for now
* Discussion: https://github.com/dotnet/csharplang/discussions/8992

## Summary
[summary]: #summary

Allow `KeyValuePair[] array = new[] { new("key1", value1), new("key2", value2) };`

## Design meetings

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.