Перейти к содержимому

C# 12 Collection Expressions and the Spread Operator

Coding Tutorials

0:00 / 0:00

C# 12 Collection Expressions and the Spread Operator

2 878 просмотров · 2 года назад
Coding Tutorials
16,5 тыс. подписчиков
2 878 просмотров · 2 года назад
Initializing arrays is C# has always been easier than initializing other collections. In C#12 we can do it all in the same way. Source code available at: https://github.com/JasperKent/Collect... Related videos: C# 9 Fit and Finish    • C# 9 - Fit and Finish   Implementing IEnumerable    • Implementing IEnumerable   C# 12 Primary Constructors    • C# 12 Primary Constructors   Stackalloc and Spans    • Stackalloc and Spans   Topics include: Brief history of array initialization C#3 collection initializers Creating empty collections C#12 collection expressions Problems initializing Dictionaries Initializing multidimensional arrays The C#12 spread operator (..) Using collection expressions and spread with custom collections Initializing with the CollectionBuilder attribute