When I saw "Hello World", I remembered a joke: A programmer who retired for many years decided to practise calligraphy, he picked up a brush and brush ink to write the next line of characters-"Hello world". Although it is a joke, but also feel a trace of the programmer to ridicule their taste. Indeed, when learning a new language, it is to learn from the simplest "Hello World".
The first step: Of course, install Visual Studio, choose New--Project--visual c#--Console Application
The second step: Because some code is generated by VS itself, just write down in main to show "Hello World" to the console
Execute program, program run Result:
Note: The program inserted two changes in the console color console.foregroundcolor and background color Console.foregroundcolor function, because the change foreground color function is inserted in the front, so, all the following fonts have become red, change the background color function inserted in the first WR After the iteline, the background color behind it turns blue.
Of course, VS has many features, such as creating a window application and so on, and the individual thinks it's much easier than javafx to create a window. In fact, my understanding of Java and C # is still very similar, just pay attention to the special points. As the study progresses, there will be other aspects of the content. (In view of the first time blogging and Learning C #, there may be some deficiencies and mistakes, and hope to give correct).
The first program of C # Learning notes "Hello World"