From 8481eec06fc85298ce856108ea7d19a99ba7b7aa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 1 Jul 2025 18:00:32 +0000 Subject: [PATCH 1/3] Initial plan From 13225327b72c1bc643fdfb4a093da77afe9c0126 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 1 Jul 2025 18:12:09 +0000 Subject: [PATCH 2/3] Add using statement guidance for extension methods in LINQ tutorial Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- docs/csharp/tutorials/working-with-linq.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/csharp/tutorials/working-with-linq.md b/docs/csharp/tutorials/working-with-linq.md index 68f700d45b431..1a561de8ae134 100644 --- a/docs/csharp/tutorials/working-with-linq.md +++ b/docs/csharp/tutorials/working-with-linq.md @@ -47,6 +47,9 @@ using System.Linq; If these three lines (`using` directives) aren't at the top of the file, your program might not compile. +> [!TIP] +> For this tutorial, you can organize your code in a namespace called `LinqFaroShuffle` to match the sample code, or you can use the default global namespace. If you choose to use a namespace, make sure all your classes and methods are consistently within the same namespace, or add appropriate `using` statements as needed. + Now that you have all of the references that you'll need, consider what constitutes a deck of cards. Commonly, a deck of playing cards has four suits, and each suit has thirteen values. Normally, you might consider creating a `Card` class right off the bat and populating a collection of `Card` objects by hand. With LINQ, you can be more concise than the usual way of dealing with creating a deck of cards. Instead of creating a `Card` class, you can create two sequences to represent suits and ranks, respectively. You'll create a really simple pair of [*iterator methods*](../iterators.md#enumeration-sources-with-iterator-methods) that will generate the ranks and suits as s of strings: ```csharp @@ -160,6 +163,9 @@ namespace LinqFaroShuffle } ``` +> [!NOTE] +> If you're using an editor other than Visual Studio (such as Visual Studio Code), you might need to add `using LinqFaroShuffle;` to the top of your `Program.cs` file for the extension methods to be accessible. Visual Studio automatically adds this using statement, but other editors might not. + Look at the method signature for a moment, specifically the parameters: ```csharp From 6a6d555c4f6bc7591572f12fea060140d42ca5ac Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 2 Jul 2025 14:17:32 +0000 Subject: [PATCH 3/3] Fix file name formatting to use italics for Program.cs Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com> --- docs/csharp/tutorials/working-with-linq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/tutorials/working-with-linq.md b/docs/csharp/tutorials/working-with-linq.md index 1a561de8ae134..c8ffb58e4f5fa 100644 --- a/docs/csharp/tutorials/working-with-linq.md +++ b/docs/csharp/tutorials/working-with-linq.md @@ -164,7 +164,7 @@ namespace LinqFaroShuffle ``` > [!NOTE] -> If you're using an editor other than Visual Studio (such as Visual Studio Code), you might need to add `using LinqFaroShuffle;` to the top of your `Program.cs` file for the extension methods to be accessible. Visual Studio automatically adds this using statement, but other editors might not. +> If you're using an editor other than Visual Studio (such as Visual Studio Code), you might need to add `using LinqFaroShuffle;` to the top of your _Program.cs_ file for the extension methods to be accessible. Visual Studio automatically adds this using statement, but other editors might not. Look at the method signature for a moment, specifically the parameters: