August 21, 2019
Re-download or transfer the files you saved last time (the whole Welcome folder) on the computer and make sure you can still open the project with Visual Studio (VS). Do you remember how to build the solution and start the program without debugging? Using the shortcuts? If not, go have another look at the previous lab.
If your backup went wrong (you can’t open the project, it won’t compile, …), try to understand what happened. Then, re-download the “Welcome” archive, extract it and make sure you can build the solution and start the program without debugging.
Have a look at the following screenshot:

You should have roughly the same on your computer. If not, you can zoom to have a better reading.
Answer the following:
Close Visual Studio (VS). With the file explorer, create a new folder (call it for instance 02_lab) and copy the Welcome folder in it. In this exercise, you will rename and edit this copy.
Open with VS the copy of the Welcome folder that you just created. Rename the solution within VS:
.sln file changed?You should not rename a solution with the file explorer: always use VS to rename.
We will now change (edit) our “MyFirstProgram” solution.
In program.cs, replace "Welcome to the lab portion of CSCI 1301!" with "This is my first program.".
Build the solution and start the program without debugging. Do you notice any change?
Insert a new line after // This is an in-line comment. and before the first } sign, and paste the following:
Build the solution and start the program without debugging. Do you notice any change?
Insert another new line after the one you just created, and paste the following:
Build the solution and start the program without debugging. Can you notice the difference between WriteLine and Write?
Insert another new line after the one you just created, and paste the following:
Build the solution and start the program without debugging. Can you tell what \t is doing?
Insert another new line after the one you just created, and paste the following:
Build the solution and start the program without debugging. Can you tell what \n is doing?
Have a look the documentation page of microsoft on escape sequences, and edit your program by adding a statement that displays the \ and the " characters.
Add a comment (using // or /* and */) in your program.
Make a back up of what you just did: upload the 02_lab folder you created previously on your remote backup, or copy it on your thumb drive. Do not use the “Save as…” capacities of VS: close VS and copy / upload the folder “by hand”, using the file explorer or a browser. Re-downloading or re-transfering it and re-opening it is a good way of making sure that your back up was correct.
If you followed the instructions carefully, your were able to build the solution and start the program without debugging after each step. As you know, C# has precise rules, and not respecting them can prevent your solution from being built by VS.
In this exercise, you are asked to do the following:
Change the program so that it violates one of the syntax rules of C# (refer to your lecture notes, and to the suggestions below).
Build the solution, and note that an error is reported. In the build output (cf. the screenshot presented earlier, you may need to click on a tab in VS to see it), you will see a message like
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========Click on the “Error list” tab next to the build output, and make sure you understand the error message.
Undo your change, using Ctrl + z.
Make sure you can build the solution without error message anew.
Do it three times, in order to identify three different error messages, and three ways of breaking the rules.
If you have time or lack inspiration, you can try with the following, and see which one(s) make the building impossible (don’t forget to undo your change after):
using Systemclass Welcome with class TestOne} symbol) at the last line.Console.WriteLine with CONSOLE.WriteLineConsole.WriteLine with Console.WRITELINEConsole. and WriteLineWriteLine and (Write and LineMain() with Method()