This article mainly introduces the basic knowledge of C #-the key word of the relevant knowledge, has a good reference value, followed by a small series to see it
Example:
Using system;using system.collections.generic;using System.text;namespace test{class Program { static void Main ( String[]args) { Console.WriteLine ("Hello world!");}}}
1. Keyword class, the purpose of this keyword is to declare the class, is the C # program the smallest unit, such as the above example, the class name is called program.
2. Keyword namespace, the purpose of this keyword is to declare "namespaces." In the example above, the namespaces are called MYAPP1.
3. Keyword using, the purpose of this keyword is to import namespaces. For example: using System.Text; The role is to import classes in the System.Text namespace.
4. Keyword static (static), void (no return value), string (string type). Often seen in the declaration of the main () method: static void Main (string[] args)
5. The main () method is a special method in C #, the entrance to the program, which means that the program cannot start without the main () method.
6. All keywords are made up of lowercase letters, and the case is strictly distinguished in the C # language.
7. Shortcut key--f5 (for debugging); CTRL + F5 (no debugging, direct start).
8. Output a word of command: Console.WriteLine ("Hello world!")