C # Basic Summary (ii)--c# development tools Visual Studio (IDE)

Source: Internet
Author: User

One, Visual Studio

  Visual Studio is a Microsoft company's development toolset and a must-have for C # development. The following is attached to the VS2013 Simplified Chinese Community Edition:

Link: Https://pan.baidu.com/s/1DGj_aiEa8EO4c7exU66XUA Password: PCWR

Second, create a "Hello World" program with VS2013

  1. Click "File" in the top left corner, then "new" and click "Project" .

  

  2. Select "Visual C #", then click "Console Application", then click OK in the bottom right corner. What does it mean to draw the red line?

  name : Refers to the name of the project.

  location : means where to put the production code (do not have the Chinese path)

  Solution Name : The place where a project is stored, that is, there can be several different projects within the solution.

  3, according to the code in the figure to knock once again, do not care what meaning, after the knock on the key combination of "ctrl+s" to save the code, and then press the key combination "CTRL+F5" quickly run this code, and then will pop up a console window, and the data inside the window is just "Hello world!",:

The console displays "Hello world!":

Third, analyze the code just now

Let's take a look at what the code is made of, as shown in the following sections:

  reference Namespaces : Similar to a guide package in Java. For example, suppose I create a Class B, and now I want to call a "eat" method in Class B, just to have a "eat" method in Class A, so I call this method in Class B.       (For the sake of understanding, regardless of the static problem), how to call the Class A method in class B? "A.  Eat ", and every time you call to eat the way you want to " A. "  eat ", this is too troublesome. And if I write the using a directly above the code, then I do not need "a" in B to eat, but directly "eat" on the line, thus eliminating the "a." This step, and every time you can directly call "eat" on the line.

  Project Name: The name of the project, in which multiple classes can be contained within a project.

  class Name: The name of the class.

  Main Method : The main method is the entrance to the program, which means that the execution code starts here from main.

  

Now let's see what the two lines of code mean:

Console.WriteLine ("Hello world!") This means: show the word in parentheses in the console window, that is, Hello world!

console.readline () This means: When the program runs to this sentence, pausing the console and then pressing any key will close the console window. If this sentence is not added, the console window displays "Hello world!" After a flash, that is, immediately close, basically is not clear what is displayed.

  

C # Basic Summary (ii)--c# development tools Visual Studio (IDE)

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.