Some of the most basic applications for C # have been learned recently through the school C # course. According to the teacher's classroom explanation, the class has carried on some related relations with himself.
First, the use of System.Console.WriteLine (""); This statement makes simple text output. At the same time, Foregroundcolor and backgroundcolor under the console are used to change the font of text and the color of the background with Consolecolor. In addition, the command line parameters are set in the project-Properties-debug-start option, the array args are assigned, and they are output in the subsequent output text contact.
Is the result of code and output that you write in your own experiment.
After this experiment, I tried again by creating a new class and doing an output text exercise.
The above three photos are the code of the main program and Class I wrote and the assignment of command line arguments.
By using the F11 to debug, I understand the process of some programs at run time.
First, we can see that the values of three arrays have been set by command line parameters when the program is running here. Press F11 again to get the following result:
We can find that this time the contents of the array args have been passed into the array words in the new object goodevening created. The contents of the words can be output in the next output process. The following picture shows the output after the run:
Through this exercise, I was familiar with and mastered some of the basic output text methods in C # statements.
Liam's C # Learning Journey (i): Get started! "Hello world!"