Beginner C #, use vs to start Hello world!

Source: Internet
Author: User

younger brother Beginner C #, just learned to use vs to write classic Hello,world program, record, and share to everyone.

1. Create a new C # console program with VS:

A. First open VS, as shown in, click on "New Project"

B. Then it will appear, click on "Visual C #", "Console Application", if necessary modify the name and location below, click "OK".

Such a C # console program is new!

C. The interface of the new number:

2. Start the code link and write the Hello,world program:

  A. Basic tutorial: Fill in the code, then press "CTRL" + "F5". As follows:

B: Explain + try to learn:

The system is a namespace, and it is top-level. Namespace is a namespace, and one namespace and the other are independent,

So even if you have the same name in two namespaces.

Second, the console is the name of a class, and WriteLine is a method that is responsible for outputting text (Hello,world) to the console.

There are many methods inside the console class, such as setwindowssize (int x,int y) to set the console size;

BackgroundColor and Foregroudcolor can set the background and foreground color of text.

Clear () is the purge information ....

Here is my Hello World improved version and code:

I haven't figured it out yet, keep trying.

Beginner C #, use vs to start 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.