Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add params collections #40978

Merged
merged 9 commits into from
May 20, 2024
Merged

Conversation

BillWagner
Copy link
Member

@BillWagner BillWagner commented May 16, 2024

Update descriptions for the params modifier to allow collections.

Contributes to #40005

This might be easiest to review commit by commit:

  1. Update What's new, language reference, and programming guide where params is mentioned. Search the content for params and make updates as needed.
  2. Review articles and samples with smaller scope changes. A general edit pass.
  3. Review methods.md: Major edit pass, move samples and trim unused samples. Small updates to the sample code.
  4. Review programming-guide Object Initializers article: Major edit pass, move samples. Small updates to the samples.
  5. Fix warnings from related samples moving.
  6. Bug fix: Fixes Confusing C# 13 example #40796

Internal previews

📄 File 🔗 Preview link
docs/csharp/language-reference/keywords/method-parameters.md Method Parameters
docs/csharp/language-reference/operators/lambda-expressions.md "Lambda expressions - Lambda expressions and anonymous functions"
docs/csharp/methods.md Methods in C#
docs/csharp/misc/cs0225.md Compiler Error CS0225
docs/csharp/programming-guide/classes-and-structs/how-to-initialize-a-dictionary-with-a-collection-initializer.md How to initialize a dictionary with a collection initializer (C# Programming Guide)
docs/csharp/programming-guide/classes-and-structs/how-to-initialize-objects-by-using-an-object-initializer.md docs/csharp/programming-guide/classes-and-structs/how-to-initialize-objects-by-using-an-object-initializer
docs/csharp/programming-guide/classes-and-structs/object-and-collection-initializers.md Object and Collection Initializers (C# Programming Guide)
docs/csharp/whats-new/csharp-13.md What's new in C# 13

Update descriptions for the `params` modifier to allow collections.

Fixes dotnet#40005
Update sample code and markdown extensions.

Grammar pass.
Move samples, edit for grammar and update.
Edit pass on the final article.
@BillWagner BillWagner marked this pull request as ready for review May 17, 2024 20:24
This commit fixes dotnet#40796
@BillWagner BillWagner requested a review from gewarren May 20, 2024 15:15
docs/csharp/methods.md Outdated Show resolved Hide resolved
docs/csharp/methods.md Outdated Show resolved Hide resolved
docs/csharp/misc/cs0225.md Outdated Show resolved Hide resolved
docs/csharp/whats-new/csharp-13.md Outdated Show resolved Hide resolved
BillWagner and others added 2 commits May 20, 2024 16:37
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Respond to feedback. The Create method must follow the same pattern used for collection expressions.
@BillWagner BillWagner enabled auto-merge (squash) May 20, 2024 20:45
@BillWagner BillWagner merged commit 57cbe8e into dotnet:main May 20, 2024
8 checks passed
@BillWagner BillWagner deleted the feature-params-collections branch May 20, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing C# 13 example
3 participants