You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/wwl-language/csharp-do-while/includes/2-exercise-do-while-continue.md
+18-7Lines changed: 18 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,4 @@
1
+
1
2
On the surface, the `do-while` and `while` statements are yet *another* iteration statement that allows you to iterate through a code block and thereby change the flow of execution of your code. However, once we examine how each works, we can better identify the nuances of each iteration statement and when to use them.
2
3
3
4
## What is the do-while statement?
@@ -29,7 +30,7 @@ This module includes hands-on activities that guide you through the process of b
29
30
30
31
1. In the **Open Folder** dialog, navigate to the Windows Desktop folder.
31
32
32
-
If you have different folder location where you keep code projects, you can use that folder location instead. For this training, the important thing is to have a location that’s easy locate and remember.
33
+
If you have a different folder location where you keep code projects, you can use that folder location instead. For this training, the important thing is to have a location that’s easy to locate and remember.
33
34
34
35
1. In the **Open Folder** dialog, select **Select Folder**.
35
36
@@ -39,22 +40,32 @@ This module includes hands-on activities that guide you through the process of b
39
40
40
41
Notice that a command prompt in the Terminal panel displays the folder path for the current folder. For example:
41
42
42
-
```dos
43
+
```PowerShell
43
44
C:\Users\someuser\Desktop>
44
45
```
45
46
46
47
> [!NOTE]
47
48
> 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.
48
49
49
-
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.
50
+
1. At the Terminal command prompt, to create a new console application in a specified folder, enter the following prompt:
51
+
52
+
```dotnetcli
53
+
dotnet new console -o ./CsharpProjects/TestProject
54
+
```
55
+
56
+
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.
50
57
51
-
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.
58
+
If a message is displayed telling you that the files already exist, continue with the next steps. You'll reuse the existing project files.
52
59
53
-
1. In the EXPLORER panel, expand the **CsharpProjects** folder.
60
+
1. In the EXPLORER view, expand the **CsharpProjects** folder.
61
+
62
+
You should see the **TestProject** folder and two files, a C# program file named Program.cs and a C# project file named TestProject.csproj.
63
+
64
+
1. On the Visual Studio Code **File** menu, select **Open Folder**.
54
65
55
-
You should see the TestProject folder and two files, a C# program file named Program.cs and a C# project file named TestProject.csproj.
66
+
1. In the **Open Folder** dialog, select the **CsharpProjects** folder, and then select **Select Folder**.
56
67
57
-
1. In the EXPLORER panel, to view your code file in the Editor panel, select **Program.cs**.
68
+
1. In the EXPLORER view, expand the TestProject folder, and then select **Program.cs**.
0 commit comments