Skip to content

Conversation

BartoszKlonowski
Copy link
Contributor

@BartoszKlonowski BartoszKlonowski commented Dec 20, 2024

This pull request closes #44032

It presents the spread element examples by:

  • Creating a list out of other lists
  • Creating a list out of other lists and single element in between, to show that those syntax can be mixed
  • Using the spread element syntax to create a full list of all cats that is displayed at the very end of the collection full example

Each example is described with brief intro as other examples in that section.


Internal previews

📄 File 🔗 Preview link
docs/csharp/programming-guide/classes-and-structs/object-and-collection-initializers.md Object and Collection Initializers (C# Programming Guide)

@BartoszKlonowski BartoszKlonowski requested review from BillWagner and a team as code owners December 20, 2024 15:42
@dotnetrepoman dotnetrepoman bot added this to the December 2024 milestone Dec 20, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates PR is created by someone from the .NET community. label Dec 20, 2024
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @BartoszKlonowski

This looks great, and I'll :shipit: now.

@BillWagner BillWagner merged commit a8c1705 into dotnet:main Jan 6, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates PR is created by someone from the .NET community. dotnet-csharp/svc fundamentals/subsvc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an example with a spread element (..) in a collection expression
2 participants