Skip to content

Commit 55b9e9e

Browse files
authored
pull base content,head:MicrosoftDocs:main,into:wwlpublishsync
2 parents 1102a47 + 82fa650 commit 55b9e9e

11 files changed

+44
-23
lines changed

.openpublishing.redirection.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48738,6 +48738,16 @@
4873848738
"source_path": "learn-pr/wwl-language/csharp-evaluate-boolean-expressions/7-solution-2.md",
4873948739
"redirect_url": "/training/modules/csharp-evaluate-boolean-expressions/7-review-solution-boolean-expressions-challenge",
4874048740
"redirect_document_id": false
48741+
},
48742+
{
48743+
"source_path": "learn-pr/wwl-language/csharp-switch-case/3-challenge.md",
48744+
"redirect_url": "/training/modules/csharp-switch-case/3-exercise-challenge-switch-statements",
48745+
"redirect_document_id": false
48746+
},
48747+
{
48748+
"source_path": "learn-pr/wwl-language/csharp-switch-case/4-solution.md",
48749+
"redirect_url": "/training/modules/csharp-switch-case/4-review-solution-switch-statements-challenge",
48750+
"redirect_document_id": false
4874148751
}
4874248752
]
4874348753
}

learn-pr/wwl-language/csharp-switch-case/1-introduction.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Introduction
44
metadata:
55
title: Introduction
66
description: "Introduction"
7-
ms.date: 04/09/2024
7+
ms.date: 06/17/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit

learn-pr/wwl-language/csharp-switch-case/2-exercise-switch-case.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Exercise - Implement a switch statement
44
metadata:
55
title: Exercise - Implement a switch statement
66
description: "Exercise - Implement a switch statement"
7-
ms.date: 04/09/2024
7+
ms.date: 06/17/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit

learn-pr/wwl-language/csharp-switch-case/3-challenge.yml renamed to learn-pr/wwl-language/csharp-switch-case/3-exercise-challenge-switch-statements.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ title: Exercise - Complete a challenge activity using switch statements
44
metadata:
55
title: Exercise - Complete a challenge activity using switch statements
66
description: "Exercise - Complete a challenge activity using switch statements"
7-
ms.date: 04/09/2024
7+
ms.date: 06/17/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit
1111
ms.custom:
1212
- N/A
1313
durationInMinutes: 9
1414
content: |
15-
[!include[](includes/3-challenge.md)]
15+
[!include[](includes/3-exercise-challenge-switch-statements.md)]

learn-pr/wwl-language/csharp-switch-case/4-solution.yml renamed to learn-pr/wwl-language/csharp-switch-case/4-review-solution-switch-statements-challenge.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ title: Review the solution to the switch statement challenge activity
44
metadata:
55
title: Review the solution to the switch statement challenge activity
66
description: "Review the solution to the switch statement challenge activity"
7-
ms.date: 04/09/2024
7+
ms.date: 06/17/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit
1111
ms.custom:
1212
- N/A
1313
durationInMinutes: 6
1414
content: |
15-
[!include[](includes/4-solution.md)]
15+
[!include[](includes/4-review-solution-switch-statements-challenge.md)]

learn-pr/wwl-language/csharp-switch-case/5-knowledge-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Module assessment
44
metadata:
55
title: Module assessment
66
description: "Knowledge check"
7-
ms.date: 04/09/2024
7+
ms.date: 06/17/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit
@@ -18,7 +18,7 @@ quiz:
1818
choices:
1919
- content: "It's used to specify the condition for the switch statement."
2020
isCorrect: false
21-
explanation: "Incorrect. The default case is not used to specify the condition for the switch statement."
21+
explanation: "Incorrect. The default case isn't used to specify the condition for the switch statement."
2222
- content: "It's used to end the switch statement."
2323
isCorrect: false
2424
explanation: "Incorrect. The default case doesn't end the switch statement."
@@ -35,4 +35,4 @@ quiz:
3535
explanation: "Incorrect. The compiler doesn't remove case sections that allow “fall through” to the next switch section."
3636
- content: "The compiler will generate an error."
3737
isCorrect: true
38-
explanation: "Correct! Only one switch section is allowed to be executed. If you forget the `break` keyword (or, optionally, the `return` keyword) the compiler will generate an error."
38+
explanation: "Correct! Only one switch section is allowed to be executed. If you forget the `break` keyword (or, optionally, the `return` keyword) the compiler will generate an error."

learn-pr/wwl-language/csharp-switch-case/6-summary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Summary
44
metadata:
55
title: Summary
66
description: "Summary"
7-
ms.date: 04/09/2024
7+
ms.date: 06/17/2025
88
author: wwlpublish
99
ms.author: cahowd
1010
ms.topic: unit

learn-pr/wwl-language/csharp-switch-case/includes/2-exercise-switch-case.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
A `switch` statement is a C# selection statement that provides an alternative to an `if-elseif-else` branching construct. The `switch` statement provides advantages over an `if-elseif-else` construct when evaluating a single value against a list of known matching values.
23

34
Consider the following scenario:
@@ -68,22 +69,32 @@ This module includes hands-on activities that guide you through the process of b
6869

6970
Notice that a command prompt in the Terminal panel displays the folder path for the current folder. For example:
7071

71-
```dos
72+
```PowerShell
7273
C:\Users\someuser\Desktop>
7374
```
7475
7576
> [!NOTE]
7677
> If you are working on your own PC rather than in a sandbox or hosted environment and you have completed other Microsoft Learn modules in this C# series, you may have already created a project folder for code samples. If that's the case, you can skip over the next step, which is used to create a console app in the TestProject folder.
7778
78-
1. At the Terminal command prompt, to create a new console application in a specified folder, type **dotnet new console -o ./CsharpProjects/TestProject** and then press Enter.
79+
1. At the Terminal command prompt, to create a new console application in a specified folder, enter the following prompt:
80+
81+
```dotnetcli
82+
dotnet new console -o ./CsharpProjects/TestProject
83+
```
84+
85+
This .NET CLI command uses a .NET program template to create a new C# console application project in the specified folder location. The command creates the CsharpProjects and TestProject folders for you, and uses TestProject as the name of your `.csproj` file.
7986
80-
This .NET CLI command uses a .NET program template to create a new C# console application project in the specified folder location. The command creates the CsharpProjects and TestProject folders for us, and uses TestProject as the name of our `.csproj` file.
87+
If a message is displayed telling you that the files already exist, continue with the next steps. You'll reuse the existing project files.
8188
82-
1. In the EXPLORER panel, expand the **CsharpProjects** folder.
89+
1. In the EXPLORER view, expand the **CsharpProjects** folder.
90+
91+
You should see the **TestProject** folder and two files, a C# program file named Program.cs and a C# project file named TestProject.csproj.
92+
93+
1. On the Visual Studio Code **File** menu, select **Open Folder**.
8394
84-
You should see the TestProject folder and two files, a C# program file named Program.cs and a C# project file named TestProject.csproj.
95+
1. In the **Open Folder** dialog, select the **CsharpProjects** folder, and then select **Select Folder**.
8596
86-
1. In the EXPLORER panel, to view your code file in the Editor panel, select **Program.cs**.
97+
1. In the EXPLORER view, expand the TestProject folder, and then select **Program.cs**.
8798
8899
1. Delete the existing code lines.
89100

0 commit comments

Comments
 (0)