More pattern fundamentals - #56113
Draft
BillWagner wants to merge 2 commits into
Draft
BillWagner wants to merge 2 commits into
BillWagner wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
A documentation link needs correction before approval.
Pull request overview
Expands C# pattern-matching Fundamentals documentation with new pattern coverage and runnable examples.
Changes:
- Adds property, positional, relational, logical, parenthesized, list, and slice pattern documentation.
- Adds supporting C# snippets and navigation entries.
- Adds a relational-pattern cross-link from the operators article.
File summaries
| File | Description |
|---|---|
docs/csharp/toc.yml |
Adds the three pattern articles to the TOC. |
docs/csharp/fundamentals/patterns/snippets/patterns/RelationalLogicalPatterns.cs |
Adds relational and logical examples. |
docs/csharp/fundamentals/patterns/snippets/patterns/PropertyPositionalPatterns.cs |
Adds property and positional examples. |
docs/csharp/fundamentals/patterns/snippets/patterns/Program.cs |
Runs the new examples. |
docs/csharp/fundamentals/patterns/snippets/patterns/ListPatterns.cs |
Adds list and slice examples. |
docs/csharp/fundamentals/patterns/relational-logical-patterns.md |
Documents relational, logical, and parenthesized patterns. |
docs/csharp/fundamentals/patterns/property-positional-patterns.md |
Documents property and positional patterns. |
docs/csharp/fundamentals/patterns/pattern-matching.md |
Links the new pattern categories. |
docs/csharp/fundamentals/patterns/list-patterns.md |
Documents list and slice patterns. |
docs/csharp/fundamentals/expressions/operators.md |
Adds the relational-pattern cross-link. |
Review details
Suppressed comments (1)
docs/csharp/fundamentals/patterns/relational-logical-patterns.md:80
- This link is labeled as covering both logical and parenthesized patterns, but
#logical-patternsskips the separate#parenthesized-patternsection in the reference. Split the links or retitle this one so readers can reach the parenthesized-pattern rules.
- [Logical and parenthesized pattern reference](../../language-reference/operators/patterns.md#logical-patterns)
- Files reviewed: 10/10 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #55927
Internal previews
Build report