Skip to content

Consolidate C# statements documentation - #55616

Draft
BillWagner wants to merge 1 commit into
dotnet:mainfrom
BillWagner:wire-expressions
Draft

Consolidate C# statements documentation#55616
BillWagner wants to merge 1 commit into
dotnet:mainfrom
BillWagner:wire-expressions

Conversation

@BillWagner

@BillWagner BillWagner commented Aug 20, 2026

Copy link
Copy Markdown
Member

Fixes #55336

Finish the fundamentals sections for expressions and statements.


Internal previews

Toggle expand/collapse
File Preview link
.openpublishing.redirection.csharp.json Preview published page
docs/csharp/fundamentals/null-safety/null-operators.md Preview published page
docs/csharp/fundamentals/program-structure/index.md Preview published page
docs/csharp/fundamentals/statements/index.md Preview published page
docs/csharp/fundamentals/statements/snippets/statements-overview/Program.cs Preview published page
docs/csharp/fundamentals/tutorials/nullable-reference-types.md Preview published page
docs/csharp/fundamentals/types/built-in-types.md Preview published page
docs/csharp/language-reference/compiler-messages/cs0201.md Preview published page
docs/csharp/language-reference/keywords/statement-keywords.md Preview published page
docs/csharp/language-reference/operators/default.md Preview published page
docs/csharp/language-reference/operators/index.md Preview published page
docs/csharp/language-reference/operators/lambda-operator.md Preview published page
docs/csharp/language-reference/operators/null-coalescing-operator.md Preview published page
docs/csharp/language-reference/statements/selection-statements.md Preview published page
docs/csharp/misc/cs1002.md Preview published page
docs/csharp/programming-guide/classes-and-structs/constructors.md Preview published page
docs/csharp/programming-guide/statements-expressions-operators/equality-comparisons.md Preview published page
docs/csharp/programming-guide/statements-expressions-operators/snippets/equality-comparisons/Program.cs Preview published page
docs/csharp/toc.yml Preview published page
docs/csharp/whats-new/csharp-version-history.md Preview published page
docs/fundamentals/code-analysis/style-rules/ide0021.md Preview published page
docs/fundamentals/code-analysis/style-rules/ide0022.md Preview published page
docs/fundamentals/code-analysis/style-rules/ide0023-ide0024.md Preview published page
docs/fundamentals/code-analysis/style-rules/ide0025.md Preview published page
docs/fundamentals/code-analysis/style-rules/ide0026.md Preview published page
docs/fundamentals/code-analysis/style-rules/ide0027.md Preview published page
docs/fundamentals/code-analysis/style-rules/ide0053.md Preview published page
docs/fundamentals/code-analysis/style-rules/ide0061.md Preview published page

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 20, 2026 17:19
@dotnetrepoman dotnetrepoman Bot added this to the August 2026 milestone Aug 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR consolidates and rewires C# statements and expression-bodied members content by moving statements coverage into the Fundamentals section, making the lambda operator page the canonical location for expression body definitions, and adding redirects/TOC updates to preserve navigation and links.

Changes:

  • Add a new Fundamentals statements overview article and runnable snippet project, and update TOC to surface the new statements content under “Expressions and statements”.
  • Replace references to the removed Expression-bodied members programming-guide article with links to the lambda operator’s “Expression body definition” section, and add redirects for removed pages.
  • Remove legacy programming-guide statements content and older snippet assets that are no longer referenced.

Reviewed changes

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

Show a summary per file
File Description
samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideStatements/CS/Statements.cs Removes legacy statements/equality sample source that’s no longer referenced by docs.
samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideStatements/CS/Program.cs Removes legacy snippet runner entry point.
samples/snippets/csharp/programming-guide/classes-and-structs/ExpressionBodiedMembers/Program.cs Removes legacy expression-bodied members snippet runner entry point.
samples/snippets/csharp/programming-guide/classes-and-structs/ExpressionBodiedMembers/expr-bodied-readonly.cs Removes legacy expression-bodied members snippet source.
samples/snippets/csharp/programming-guide/classes-and-structs/ExpressionBodiedMembers/expr-bodied-methods.cs Removes legacy expression-bodied members snippet source.
samples/snippets/csharp/programming-guide/classes-and-structs/ExpressionBodiedMembers/expr-bodied-indexers.cs Removes legacy expression-bodied members snippet source.
samples/snippets/csharp/programming-guide/classes-and-structs/ExpressionBodiedMembers/expr-bodied-event.cs Removes legacy expression-bodied members snippet source.
samples/snippets/csharp/programming-guide/classes-and-structs/ExpressionBodiedMembers/expr-bodied-ctor.cs Removes legacy expression-bodied members snippet source.
docs/fundamentals/code-analysis/style-rules/ide0061.md Retargets expression-bodied guidance links to the lambda operator article.
docs/fundamentals/code-analysis/style-rules/ide0053.md Retargets expression-bodied guidance links to the lambda operator article.
docs/fundamentals/code-analysis/style-rules/ide0027.md Retargets expression-bodied guidance links to the lambda operator article.
docs/fundamentals/code-analysis/style-rules/ide0026.md Retargets expression-bodied guidance links to the lambda operator article.
docs/fundamentals/code-analysis/style-rules/ide0025.md Retargets expression-bodied guidance links to the lambda operator article.
docs/fundamentals/code-analysis/style-rules/ide0023-ide0024.md Retargets expression-bodied guidance links to the lambda operator article.
docs/fundamentals/code-analysis/style-rules/ide0022.md Retargets expression-bodied guidance links to the lambda operator article.
docs/fundamentals/code-analysis/style-rules/ide0021.md Retargets expression-bodied guidance links to the lambda operator article.
docs/csharp/whats-new/csharp-version-history.md Updates links for statements and expression-bodied members to new canonical locations.
docs/csharp/toc.yml Adds Fundamentals statements nodes and removes obsolete programming-guide entries.
docs/csharp/programming-guide/statements-expressions-operators/statements.md Removes the legacy programming-guide statements article (replaced by Fundamentals).
docs/csharp/programming-guide/statements-expressions-operators/snippets/equality-comparisons/Program.cs Adds a focused snippet used by equality comparisons docs.
docs/csharp/programming-guide/statements-expressions-operators/snippets/equality-comparisons/equality-comparisons.csproj Updates the snippet project configuration for the new snippet.
docs/csharp/programming-guide/statements-expressions-operators/expression-bodied-members.md Removes the legacy programming-guide expression-bodied members article (replaced by lambda operator section + redirect).
docs/csharp/programming-guide/statements-expressions-operators/equality-comparisons.md Switches to the new local snippet include format/source.
docs/csharp/programming-guide/classes-and-structs/constructors.md Retargets expression-bodied constructor links to the lambda operator article.
docs/csharp/misc/cs1002.md Updates explanation, adds ai-usage, and points “Statements” to Fundamentals.
docs/csharp/language-reference/statements/selection-statements.md Retargets expression-bodied link to the lambda operator article.
docs/csharp/language-reference/operators/null-coalescing-operator.md Retargets expression-bodied link to the lambda operator article.
docs/csharp/language-reference/operators/lambda-operator.md Expands/clarifies expression body definition content and adds ai-usage.
docs/csharp/language-reference/operators/index.md Retargets “statement” and expression body definition references to new locations.
docs/csharp/language-reference/operators/default.md Retargets expression-bodied link to the lambda operator article.
docs/csharp/language-reference/keywords/statement-keywords.md Retargets statements link to Fundamentals.
docs/csharp/language-reference/compiler-messages/cs0201.md Retargets statements link to Fundamentals.
docs/csharp/fundamentals/types/built-in-types.md Adds a temporary “See also” comment block related to pending link wiring.
docs/csharp/fundamentals/tutorials/nullable-reference-types.md Retargets expression-bodied link to the lambda operator article.
docs/csharp/fundamentals/statements/snippets/statements-overview/statements-overview.csproj Updates the statements snippet project target/framework settings.
docs/csharp/fundamentals/statements/snippets/statements-overview/Program.cs Adds runnable snippet content for expression statements and block scope.
docs/csharp/fundamentals/statements/index.md Adds the new Fundamentals “Statements in C#” overview article.
docs/csharp/fundamentals/program-structure/index.md Retargets statements and expression-bodied links to new canonical locations.
docs/csharp/fundamentals/null-safety/null-operators.md Adds a temporary “See also” comment block related to pending link wiring.
.openpublishing.redirection.csharp.json Adds redirects for removed programming-guide pages and adjusts an existing redirect target.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/csharp/toc.yml
Comment on lines 540 to 544
- name: Statements, expressions, and equality
items:
- name: Statements
href: programming-guide/statements-expressions-operators/statements.md
- name: Expression-bodied members
href: programming-guide/statements-expressions-operators/expression-bodied-members.md
- name: Equality and equality comparisons
items:
- name: Equality comparisons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Everyday C#: Wire existing Fundamentals articles into Expressions

2 participants