Basic knowledge of C #: Basics (1) Main method

Source: Internet
Author: User
To take a single step and master a certain skill is to start with the most basic things. Warm so know new, a little thing when you in different circumstances, different time to do, always get unexpected experience and harvest.
So let's start with the main method,

The role of the Using keyword here is to introduce an "external assembly", which is the most basic assembly of the. NET platform provided by Microsoft, and all. NET programs must reference the assembly. Using the system;//namespace, which allows a class to belong to a namespace, or multiple similar in a namespace,//function is to prevent class name collisions, that is, different namespaces can have the same class name class, of course, in the canonical code, the namespace can be organized class hierarchy,// For example: Company name. Project name. Module name ... At this level, the level of engineering is at a glance. Namespace Yys. csharpstudy.mainconsole{    //c# is a purely object-oriented language, and classes are the basis of all code, and class keywords can define a class.    Class    Program The {        //main method is the entry that the project starts, and the program runs from main. String[] args is a console parameter that is run by the program and is passed in from the console.        //Standard written as follows. //<summary>//Main method///</summary>//        <param name= "args" ></param>        static void Main (string[] args)        {            Console.WriteLine ("hello,world!");            Console.readkey ();}}}    

See this familiar hello,world, whether can hook up those years, those people, those monsters, those teachers, those computers ... What about the good memories?

The above is the basic knowledge of C #: Basic knowledge (1) The contents of the main method, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!

  • 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.