This article mainly introduces the comments in C # related knowledge, has a good reference value, followed by a small series to see it
Comments, which are "descriptive text" in the code. The annotations themselves are not involved in compiling and running the program, only for programmers to read.
Comments are divided into: single-line comments, multiline comments, document comments.
The symbol for a single-line comment is 2 slash "//", and the right side of the 2 slash is commented, and the code on the left is unaffected.
Multiline comments start with "/*" and End with "*/", which is a comment and can contain multiple lines.
A document comment is written in front of a class, method, or property, and its symbol is 3 slash "///".
namespace test{///<summary>////For "greeting" (Documentation Comments)///<summary> class Program {static void Main (string[] args {/* * Below is the declaration of the variable * The second line is output * (Multiline comment) */String name = "Mary";//Name (single line comment) Console.WriteLine ("I Call" +name);}}
Note: the Console.WriteLine () in the code differs from the previous console.write (), which does not wrap, and the former will wrap after printing.