Skip to content

Conversation

@BillWagner
Copy link
Member

@BillWagner BillWagner commented Jan 21, 2026

Fixes #50891

Finish adding the include file in all files in the keywords folder.

This folder had several files that haven't been updated in years. That includes poor formatting, stale snippets, and more changes. There are more commits in this PR, and many more files. It may be easier to review commit-by-commit. Also, several formatting changes, so hide whitespace differences.

Overall, this PR did the following:

  • Add the include in all files.
  • Update the latest date.
  • Move all included snippets from the /samples/snippets folder to ./snippets. (More work here later to clean up the code).
  • Look for any technical issues. There were a few where the article stated syntax was prohibited where it no longer is (examples are static members in interfaces and parameterless constructors in struct types.)
  • Update style to match current style.

For reviewers, the articles that had been updated recently have minimal changes. Those reference files that haven't needed updates since 2017 had many more edits.

Commits:

  1. Update the abstract keyword page. Move snippets and freshness pass.
  2. Update access-modifiers.md through async.md (alphabetically by title.).
  3. Pick up build warnings, and edits through class.md.
  4. Fix new build warnings, add all keywords through group.
  5. build warnings
  6. All keywords through let.
  7. Build warnings
  8. build fixes and all keywords through null.
  9. Up through query keywords
  10. Up through unsafe
  11. Finish remaining keywords
  12. Fix warnings.
  13. Move additional snippets
  14. Move additional code files.
  15. Fix warnings.
  16. Restore dependency file

Summary

Describe your changes here.

Fixes #Issue_Number (if available)


Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
docs/csharp/language-reference/keywords/abstract.md abstract (C# Reference)
docs/csharp/language-reference/keywords/accessibility-domain.md "Accessibility Domain"
docs/csharp/language-reference/keywords/async.md async (C# reference)
docs/csharp/language-reference/keywords/class.md docs/csharp/language-reference/keywords/class
docs/csharp/language-reference/keywords/const.md The const keyword
docs/csharp/language-reference/keywords/event.md The event keyword (C# reference)
docs/csharp/language-reference/keywords/extern-alias.md "extern alias"
docs/csharp/language-reference/keywords/extern.md extern (C# Reference)
docs/csharp/language-reference/keywords/from-clause.md docs/csharp/language-reference/keywords/from-clause
docs/csharp/language-reference/keywords/group-clause.md group clause (C# Reference)
docs/csharp/language-reference/keywords/internal.md "internal keyword"
docs/csharp/language-reference/keywords/join-clause.md join clause (C# Reference)
docs/csharp/language-reference/keywords/method-parameters.md Method parameters and modifiers
docs/csharp/language-reference/keywords/new-modifier.md docs/csharp/language-reference/keywords/new-modifier
docs/csharp/language-reference/keywords/out-generic-modifier.md out (generic modifier) (C# Reference)
docs/csharp/language-reference/keywords/override.md "override modifier"
docs/csharp/language-reference/keywords/private-protected.md private protected (C# Reference)
docs/csharp/language-reference/keywords/protected.md docs/csharp/language-reference/keywords/protected
docs/csharp/language-reference/keywords/query-keywords.md Query keywords (C# Reference)
docs/csharp/language-reference/keywords/readonly.md readonly (C# reference)
docs/csharp/language-reference/keywords/ref.md The ref keyword
docs/csharp/language-reference/keywords/required.md "required modifier"
docs/csharp/language-reference/keywords/restrictions-on-using-accessibility-levels.md Restrictions on using accessibility levels (C# Reference)
docs/csharp/language-reference/keywords/sealed.md docs/csharp/language-reference/keywords/sealed
docs/csharp/language-reference/keywords/statement-keywords.md Statement keywords (C# Reference)
docs/csharp/language-reference/keywords/static.md "static modifier"
docs/csharp/language-reference/keywords/using-directive.md The using directive
docs/csharp/language-reference/keywords/virtual.md docs/csharp/language-reference/keywords/virtual
docs/csharp/language-reference/keywords/volatile.md volatile (C# Reference)
docs/csharp/language-reference/keywords/where-clause.md "where clause"

Note

This table shows preview links for the 30 files with the most changes. For preview links for other files in this PR, select OpenPublishing.Build Details within checks.

@dotnetrepoman dotnetrepoman bot added this to the January 2026 milestone Jan 21, 2026
@BillWagner BillWagner changed the title Update the abstract keyword Add version history include to the keywords folder Jan 21, 2026
@dotnet-policy-service dotnet-policy-service bot added dotnet-csharp/svc lang-reference/subsvc okr-freshness OKR: Freshness of content okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. labels Jan 21, 2026
@BillWagner BillWagner force-pushed the final-include-additions branch from 0675152 to a9d85ba Compare January 23, 2026 17:53
@BillWagner BillWagner marked this pull request as ready for review January 23, 2026 18:17
@BillWagner BillWagner requested a review from a team as a code owner January 23, 2026 18:17
Copilot AI review requested due to automatic review settings January 23, 2026 18:17
Copy link
Contributor

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.

Pull request overview

This PR updates numerous C# keyword documentation files to add version history includes, modernize formatting, move code snippets to separate files, and apply a freshness pass across the keywords folder. The changes address issue #50891, which requested adding prominent links to version history for C# features.

Changes:

  • Added version history includes ([!INCLUDE[csharp-version-note](../includes/initial-version.md)]) to 50+ keyword documentation files
  • Updated ms.date fields to 01/21/2026 or 01/22/2026 across all modified files
  • Moved inline code snippets to separate .cs files in the snippets subdirectory with proper snippet IDs
  • Modernized documentation style following Microsoft's voice and tone guidelines (active voice, contractions, "you" perspective)
  • Restructured list formatting from tables to bullet lists in several files for improved readability

Reviewed changes

Copilot reviewed 82 out of 102 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Multiple keyword .md files Added version history include, updated dates, improved writing style
snippets/*.cs files New code snippet files extracted from inline code
Project files (.csproj) Deleted obsolete project files, updated main keywords.csproj
implicitly-typed-local-variables.md Replaced snippet reference with inline code
Various deleted files Removed old snippet infrastructure and project files

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@BillWagner
Copy link
Member Author

The snippets 5000 error is a false positive. Two project files were removed when the code moved to the keywords project.

@BillWagner BillWagner closed this Jan 23, 2026
@BillWagner BillWagner reopened this Jan 23, 2026
Copy link
Contributor

@meaghanlewis meaghanlewis left a comment

Choose a reason for hiding this comment

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

These changes LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dotnet-csharp/svc fundamentals/subsvc lang-reference/subsvc okr-freshness OKR: Freshness of content okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add prominent links to the Version history page.

2 participants