Building the Foundation on the 7th day -- C # Day 1 (I)

Source: Internet
Author: User

Starting from today, we will introduce how to get started with C #. In fact, the goal of learning any language is to make things we can imagine, so we should set a certain direction at the beginning of learning, many people learn more and become more appealing. For example, I had a student who started learning programming for the purpose of making a game of his dream, but the learning goal was not clear, and these problems had to be resolved one day later. For example, when I do an exercise, I need to ask: "Is the data of the int type good, or is it of the double type good? Is this loop used for or while ?" And so on. If you allow me to swear words, I want to say, what are your concerns about TMD? Can you do it first to show it to me?

I will not talk much about it. Let's get started. Today, I want to talk about what C # will do on the first day. In fact, it is very simple to describe some conversations in daily life in C #, just like when a child learns a language, he can use Chinese to express his "coming soon" in Chinese. Of course, if you are not a genius, you will not be able to achieve this level of proficiency in a day. But we need to clarify this idea.

Next, let's start from the simplest way. When the school starts, students generally need to introduce themselves. We will use this example. For example, we require students to introduce themselves in the following format. "My name is Wei zhentian. I am 20 years old. I like playing football and surfing the Internet. I hope to grow with you in the next three years ." What should I do if I use the C # language? The Code is as follows:

It doesn't matter if you are not familiar with programming. Let's give a brief introduction. To do well, you must first sharpen your tools. Since you are planning to learn the C # language, the official vsplatform must download one first, and then spend a few minutes getting familiar with it. Now you only need to create a project. For beginners, we recommend that you start by creating a console application. Follow these steps: Create a project> Visual C #> console application. You can use demo for the project name, which is simple and convenient, haha. I have a point that may be different from many people. I think that people who have just started to learn should not talk too much about the rules with him. I will emphasize this when he has a certain foundation. When beginners get started, they say this method is incorrect. The naming is not standard and it is easy to combat the enthusiasm of learners.

After the project is created, the above Code is available by default.Program entryAll the code should be written between the two braces of the code "static void main (string [] ARGs. Enter "console. writeline (" xxxxxxxxxxxxxxx ");" between braces, and then pressCTRL + F5You can run the command to view the effect.

The above is a piece of code that can be run, isn't it easy? Hey, I'm tired of typing so many words today. Take a rest first. If you have time at night and talk about the second half, if you don't have time, tomorrow.

Declaration: I am very happy to have my children's shoes reprinted in my article. Thank you for your approval. It indicates that these things are helpful to some friends. However, please note that this is an easy-to-learn Park Reprinted from the blog Park. It is not easy to create an original site. Although there is not much content, it took me more than an hour to summarize it. Thank you again.

 

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.