How to play Bad "Hello World" with C # on vs.
In order to develop WIN8 applications, re-installed the system to win8.1, the VS2013 Ultimate version, we began to use C #, today to play "Hello world."
First, open vs and build a console application. My build path is C:\Users\ZhangXiao\Desktop\, project name is Consolehelloworld.
, type a line of code, invoke the WriteLine function of the console class in the System namespace, and output a sentence on the console.
The first method, open the CMD command prompt and use the CD command to enter the C:\Users\ZhangXiao\Desktop\ConsoleHelloWorld\ConsoleHelloWorld\bin\Debug folder, Then open the ConsoleHelloWorld.exe file and you will see the output of the statement.
The second way is to CTRL+F5 and run the program.
After that, test some of the functions in the console, Foregroundcolor and Backgroundcolor,windowheight. Note that the value of Windowcolor cannot exceed 50, otherwise it overflows.
As a result, the color and window size can be changed!
Using the StreamWriter class output TXT file, note the namespaces for adding System.Text and System.IO, and note that the close () function is called last, otherwise it cannot be generated.
The file is generated!
How to play Bad "Hello World" with C # on vs.