Steven Giesel 6/17/2023

C# 12: Collection literals

Read Original

This article details the new 'collection literals' feature in C# 12, which introduces a terse syntax like [e1, e2, e3] for creating common collection values. It covers the spread operator (..) for inlining collections, planned support for dictionaries, and how custom collections can implement the feature via CollectionBuilder.

C# 12: Collection literals

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet