C #. NET learning notes 2---C #. the first C # program technology qq Communication Group: JavaDream: 251572072 download tutorial, online communication: chuangmeng IT community: www. credream. com6. the first C # program:. single line comment: // B. multi-line comment :/*... */, note * There is no space between the two. The only three console commands to be learned are: You want to print the console: hello... using System; using System. collections. generic; using System. linq; using System. text; namespace ConsoleApplication1 {class Program {static void Main (string [] args) {Console. writeLine ("hello... "); Console. readKey (); // click the button to continue execution.} -------------------------------------------- 1. solution resource manager on the right: Release the Program of each project. cs is short for c shape; 2.c# the source file ends with cs. The entrance of c # program is the Main function. Write the code in Main, don't worry about what other parts mean. 3. common Errors: No semicolon at the end, Case sensitivity error 4. display the code line number; Select menu bar -- tool --- option --- left-side text editor --- C # -- check the line number; 5. a. c # Syntax: Execute B from top to bottom. case Sensitive c. function parameters are enclosed by (). d. use semicolons (;) to separate two sentences (error: full angle problem) e. note: single line comment and multi-line comment; ------------------------------------------------- 1. variable: Data Type: string, int, char, decimal, byte, double, long, float; string escape: \ backslash, linefeed: "a \ nb ", at this time, \ n refers to a line break "\ AB" which can output: \ AB;. c: \ temp \ files \ imag.jpg, which is used for escape; string s = @ "\\\" // note @ indicates that \ In the string is not treated as an escape character; using System. collections. generic; using System. linq; using System. text; namespace ConsoleApplication2 {class Program {static void Main (string [] args) {/* int I = 10; Console. writeLine (I); string name = Console. readLine (); Console. writeLine (name + "hello... "); */string s =" \ "a \ nb \""; string s = @ "\\\" // note @ indicates that \ In the string is not considered as an escape character;, @ is only meaningful to the \ Escape Character Console. writeLine (s); Console. readKey ();}}}