You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dictionary Expressions are a continuation of the C# 12 Collection Expressions feature. They extend that system with a new terse syntax, ["mads": 21, "dustin": 22], for creating common dictionary values. Like with collection expressions, merging other dictionaries into these values is possible using the existing spread operator .. like so: [.. currentStudents, "mads": 21, "dustin": 22]
Dictionary expressions
Summary
Dictionary Expressions are a continuation of the C# 12 Collection Expressions feature. They extend that system with a new terse syntax,
["mads": 21, "dustin": 22]
, for creating common dictionary values. Like with collection expressions, merging other dictionaries into these values is possible using the existing spread operator..
like so:[.. currentStudents, "mads": 21, "dustin": 22]
Design meetings
main/meetings/2024/LDM-2024-03-11.md#dictionary-expressions
main/meetings/2024/LDM-2024-05-15.md#dictionary-expressions
main/meetings/2024/LDM-2024-09-06.md#dictionary-expressions
https://github.com/dotnet/csharplang/blob/main/meetings/2024/LDM-2024-11-20.md#dictionary-expressions
The text was updated successfully, but these errors were encountered: