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

Updates for collection expressions clarity #39867

Merged
merged 3 commits into from
Mar 12, 2024

Conversation

BillWagner
Copy link
Member

@BillWagner BillWagner commented Mar 7, 2024

Fixes #39586

This issue lists several elements. Here are the updates for each of them:

  1. Add the list of potential interface types that a collection can be converted into. In addition, add an alert that in all cases, the collection is materialzed.
  2. I didn't add a lot here. I think the addition about instantiating the collection is enough.
  3. The additional list of interfaces as conversion targets has been added. I didn't specify the type generated, because that's an implementation detail that may not be visible, and may change.
  4. I added a definition of a Countable type in the member access operator article. I linked between both. I don't think more is needed, as this fact is also emphasized in the definition of a well behaved collection.
  5. Add the definition of a well-behaved collection.

Finally, do a general edit pass.


Internal previews

📄 File 🔗 Preview link
docs/csharp/language-reference/operators/collection-expressions.md Collection expressions - C# language reference
docs/csharp/language-reference/operators/member-access-operators.md Member access operators and expressions - the dot, indexer, and invocation operators.

Fixes dotnet#39586

This issue lists several elements. Here are the updates for each of them:

1. Add the list of potential interface types that a collection can be converted into. In addition, add an alert that in all cases, the collection is materialzed.
1. I didn't add a lot here. I think the addition about instantiating the collection is enough.
1. The additional list of interfaces as conversion targets has been added. I didn't specify the type generated, because that's an implementation detail that may not be visible, and may change.
1. I added a definition of a *Countable* type in the member access operator article. I linked between both. I don't think more is needed, as this fact is also emphasized in the definition of a *well behaved* collection.
1. Add the definition of a well-behaved collection.

Finally, do a general edit pas.
@BillWagner BillWagner requested a review from gewarren March 7, 2024 22:10
@BillWagner BillWagner marked this pull request as ready for review March 7, 2024 22:11
@BillWagner BillWagner enabled auto-merge (squash) March 11, 2024 20:17
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
@BillWagner BillWagner merged commit 42e6680 into dotnet:main Mar 12, 2024
8 checks passed
BillWagner added a commit to BillWagner/docs that referenced this pull request Mar 12, 2024
I'd marked the conversations on edits as "resolved" before I'd pushed my edits.

Auto-merge burned me.

These respond to the two edit requests without suggestions.
BillWagner added a commit that referenced this pull request Mar 13, 2024
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.

The collection expressions article in the language reference does not mention a lot of information
3 participants