C# 12 arrived in November with .NET 8, bringing several new features—primary constructors, collection expressions, inline arrays, and more—that make it simpler and easier to write more efficient code.
I recently did a column about how to create a simple collection class. In that column, I discussed collection initializers which let you add items to a collection when the collection is instantiated.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results