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 deconstruction lang reference #44023

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

BillWagner
Copy link
Member

@BillWagner BillWagner commented Dec 18, 2024

Fixes #28091

The scenario described in the referenced issue is an advanced scenario, and didn't belong in the fundamentals section. There wasn't an article on deconstruction expressions in the language reference. This PR adds that. In addition, there wasn't an article in the language reference on the discard token. This PR adds that as well.


Internal previews

📄 File 🔗 Preview link
docs/csharp/language-reference/operators/deconstruction.md Deconstruction expression - Extract properties of fields from a tuple or other user-defined type
docs/csharp/language-reference/toc.yml docs/csharp/language-reference/toc
docs/csharp/language-reference/tokens/discard.md Discard - A _ acts as a placeholder for a variable
docs/csharp/language-reference/tokens/index.md C# Special Characters

Fixes dotnet#28091

The scenario described in the referenced issue is an advanced scenario, and didn't belong in the fundamentals section. There wasn't an article on *deconstruction expressions* in the language reference. This PR adds that. In addition, there wasn't an article in the language reference on the *discard* token. This PR adds that as well.
@BillWagner BillWagner marked this pull request as ready for review December 19, 2024 15:57
@BillWagner BillWagner requested a review from a team as a code owner December 19, 2024 15:57
@BillWagner BillWagner requested review from adegeo and Copilot December 19, 2024 15:57
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • docs/csharp/language-reference/operators/deconstruction.md: Evaluated as low risk

docs/csharp/language-reference/tokens/discard.md Outdated Show resolved Hide resolved
@BillWagner
Copy link
Member Author

ping @adegeo for review

docs/csharp/language-reference/toc.yml Outdated Show resolved Hide resolved
docs/csharp/language-reference/operators/deconstruction.md Outdated Show resolved Hide resolved
docs/csharp/language-reference/operators/deconstruction.md Outdated Show resolved Hide resolved
docs/csharp/language-reference/operators/deconstruction.md Outdated Show resolved Hide resolved
docs/csharp/language-reference/operators/deconstruction.md Outdated Show resolved Hide resolved
docs/csharp/language-reference/operators/deconstruction.md Outdated Show resolved Hide resolved
docs/csharp/language-reference/operators/deconstruction.md Outdated Show resolved Hide resolved
docs/csharp/language-reference/operators/deconstruction.md Outdated Show resolved Hide resolved
docs/csharp/language-reference/operators/deconstruction.md Outdated Show resolved Hide resolved
Co-authored-by: Genevieve Warren <[email protected]>
@BillWagner BillWagner enabled auto-merge (squash) December 20, 2024 21:50
@BillWagner BillWagner merged commit ffb3a5c into dotnet:main Dec 20, 2024
8 checks passed
@BillWagner BillWagner deleted the deconstruction-reference branch December 20, 2024 22:12
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.

Possible improvement: user-defined type deconstructors with same arity
2 participants