Skip to content

Conversation

@BillWagner
Copy link
Member

@BillWagner BillWagner commented Nov 25, 2025

Contributes to #45758

Commit history: (It may be easiest to review commit-by-commit)

  1. Update the sample code and snippet tags for the LINQ tutorial. The code was several versions old. I think this hasn't been freshened with new concepts since .NET 6
  2. First pass edit on LINQ tutorial.
  3. Second pass edit on LINQ tutorial.
  4. Edit extensions in programming guide, classes and struct section.
  5. Finish other edits on programming guide.

Internal previews

📄 File 🔗 Preview link
docs/csharp/programming-guide/classes-and-structs/how-to-create-a-new-method-for-an-enumeration.md How to create a new method for an enumeration (C# Programming Guide)
docs/csharp/programming-guide/classes-and-structs/how-to-use-implicitly-typed-local-variables-and-arrays-in-a-query-expression.md "How to use implicitly typed local variables and arrays in a query expression"
docs/csharp/programming-guide/generics/constraints-on-type-parameters.md Constraints on type parameters (C# Programming Guide)
docs/csharp/toc.yml Taken from https://github.com/dotnet/roslyn/wiki/Samples-and-Walkthroughs
docs/csharp/tutorials/working-with-linq.md docs/csharp/tutorials/working-with-linq

Update the sample code and snippet tags for the LINQ tutorial

missed one edit.

fix build
@BillWagner BillWagner force-pushed the extensions-tutorial-linq branch from f14cd92 to ed1fa8a Compare November 25, 2025 20:45
@BillWagner BillWagner force-pushed the extensions-tutorial-linq branch from eccb2f5 to c0562e8 Compare November 25, 2025 22:10
@BillWagner BillWagner force-pushed the extensions-tutorial-linq branch from c0562e8 to b8fcd03 Compare November 25, 2025 22:16
@BillWagner BillWagner marked this pull request as ready for review November 26, 2025 17:06
@BillWagner BillWagner requested review from a team and IEvangelist as code owners November 26, 2025 17:06
@BillWagner
Copy link
Member Author

I marked this as ready, and changed from "fixes" to "contributes to". The one folder remaining is the LINQ section, which will have quite a few changes. Splitting to make reviews a bit easier.

Copilot finished reviewing on behalf of BillWagner November 26, 2025 17:11
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 pull request modernizes the LINQ tutorial and programming guide for C# extension members. The primary focus is updating the sample code to use the modern extension syntax introduced in C# 14, along with editorial improvements to align with documentation style guidelines.

Key changes:

  • Updates the LINQ tutorial with modernized extension member syntax and improved editorial clarity
  • Reorganizes the table of contents to elevate "Extension members" to a top-level section
  • Updates project files to target .NET 10.0 (net10.0)

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
docs/csharp/tutorials/working-with-linq.md Updated LINQ tutorial with editorial improvements, modernized terminology, and corrected date/metadata
docs/csharp/tutorials/snippets/console-linq/Program.cs New main program file using modern extension syntax and updated enum-based card deck
docs/csharp/tutorials/snippets/console-linq/extensions.cs Refactored to use modern extension container syntax instead of traditional static extension methods
docs/csharp/tutorials/snippets/console-linq/InterimSteps.cs New file containing tutorial step-by-step code snippets for progressive learning
docs/csharp/tutorials/snippets/console-linq/playingcard.cs Modernized to use record type with sealed modifier
docs/csharp/tutorials/snippets/console-linq/README.md New README documenting the sample project
docs/csharp/tutorials/snippets/console-linq/LInqFaroShuffle.csproj Updated to target net10.0 with ImplicitUsings enabled
docs/csharp/programming-guide/generics/snippets/GenericWhereConstraints.cs Updated extension method examples to use modern extension syntax
docs/csharp/programming-guide/generics/snippets/generics.csproj Updated to target net10.0
docs/csharp/programming-guide/classes-and-structs/snippets/how-to-implement-and-call-a-custom-extension-method/Program.cs Refactored to demonstrate modern extension member syntax
docs/csharp/programming-guide/classes-and-structs/snippets/how-to-implement-and-call-a-custom-extension-method/how-to-implement-and-call-a-custom-extension-method.csproj Updated to target net10.0
docs/csharp/programming-guide/classes-and-structs/how-to-use-implicitly-typed-local-variables-and-arrays-in-a-query-expression.md Updated cross-reference from "Extension Methods" to "Extension members"
docs/csharp/programming-guide/classes-and-structs/how-to-create-a-new-method-for-an-enumeration.md Updated date metadata
docs/csharp/programming-guide/generics/constraints-on-type-parameters.md Updated date metadata
docs/csharp/toc.yml Reorganized to promote "Extension members" to a top-level section under "Classes, Structs, and Records"
samples/snippets/csharp/getting-started/console-linq/playingcard.cs Removed old file (replaced by tutorial snippets version)
samples/snippets/csharp/getting-started/console-linq/Program.cs Removed old file (replaced by tutorial snippets version)

Copy link
Member Author

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

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

Talk back to copilot

@BillWagner BillWagner merged commit ea8ac64 into dotnet:main Dec 1, 2025
9 checks passed
@BillWagner BillWagner deleted the extensions-tutorial-linq branch December 1, 2025 18:48
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.

2 participants