An example is a using system; / / quoted a name space called System Class HelloWorld // Defines a class {public static void main () // static main method is the 入 of the program {Console.Writeline ("Hello, World! "); // Output Hello, World!}}
Two examples
Using system; // quoted a name space called SYSTEM
Class EasyInput // The name of the class is different from the file name. It does not matter {public static void main () {string strname; // Declare a string type value variable console.write ("please input your name:"); // output one sentence Due, but do not change strname = console.readline (); // read from the keyboard into the user's input, the carriage return indicates the input end console.writeline ("Hello, {0}!", Strname); // Format Output Hello Information}}