The first program of C # Learning notes "Hello World"

Source: Internet
Author: User

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"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.