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)!