Skip to content

Add a new API to initialize an ImmutableDictionary in a single expression/invocation without first creating a mutable dictionary #9144

Discussion options

You must be logged in to vote

See: #8658

That should enable:

ImmutableDictionary<string, int> MyImmutableDictionary1 = ["a": 1, "b": 2];

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Bartleby2718
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants