c # // comments and annotations difference ///

 

/// will be compiled, 
// not
so use /// will slow down the speed of compilation (but does not affect the speed of execution)
/// will provide IntelliSense when other people call your code

it is also a comment but this comment, there are two main functions:
1. these comments can generate an XML file. So it seems content will program a glance.
2. In this way, after your classes, properties, methods, etc. with comments, when you use elsewhere in this way add classes, properties, methods, and so to time, which will yellow balloons write your comment show up, you better understand the role that you want to use the function.

/// <Summary>
/// user defined name attribute is a readable and writable attribute
/// </ summary>

 

C # Coding time, often involving code comments, common annotations include two categories:
1) single-line comments. Format: // Comments
2) multi-line comments. Format: / * ... * Comments /
C # introduces a new XML comments that we a new line before a function, enter ///,VS.Net will automatically add comments in XML format, sorting available here at XML comments.
An XML comment into the comment (Primary Tags) and two annotations (Secondary Tags), the former can stand alone, which must be included within a comment.
An I Notes
1. <remarks> of the type described, a similar function <summary>, reportedly recommended <Remarks>;
2. <Summary> consensus type of classes, methods, attributes or comment fields;
3. <value > Notes properties mainly for representing the meaning of the attributes made, may be blended <summary> used;
4. <param> for parameters of the method will be described below, the format: <param name = "param_name" > value </ param >;
5. the <returns> is used to define the return value, a method for, after the /// input, automatically added <summary>, <param> and list <returns>;
6. the <Exception> defined may throw exception, the format: <exception Cref = "IDNotFoundException">;
7. the <Example>


10. <include> is used to indicate an external XML comment;
II two Notes
1. <c> or <code> is mainly used for the code snippet;
2. <para>, is similar in HTML <p> tags, It is the segment;
3. <pararef> used to refer to a parameter;
similar 4. <see> role <seealso>, other methods may be indicated;
5. the <list> is used to generate a list;
in addition, also from Custom XML tags

Reprinted to https://www.cnblogs.com/liuyaozhi/

 
 

 

 
/// will be compiled, 
// not
so use /// will slow down the speed of compilation (but does not affect the speed of execution)
/// will provide IntelliSense when other people call your code

it is also a comment but this comment, there are two main functions:
1. these comments can generate an XML file. So it seems content will program a glance.
2. In this way, after your classes, properties, methods, etc. with comments, when you use elsewhere in this way add classes, properties, methods, and so to time, which will yellow balloons write your comment show up, you better understand the role that you want to use the function.

/// <Summary>
/// user defined name attribute is a readable and writable attribute
/// </ summary>

 

C # Coding time, often involving code comments, common annotations include two categories:
1) single-line comments. Format: // Comments
2) multi-line comments. Format: / * ... * Comments /
C # introduces a new XML comments that we a new line before a function, enter ///,VS.Net will automatically add comments in XML format, sorting available here at XML comments.
An XML comment into the comment (Primary Tags) and two annotations (Secondary Tags), the former can stand alone, which must be included within a comment.
An I Notes
1. <remarks> of the type described, a similar function <summary>, reportedly recommended <Remarks>;
2. <Summary> consensus type of classes, methods, attributes or comment fields;
3. <value > Notes properties mainly for representing the meaning of the attributes made, may be blended <summary> used;
4. <param> for parameters of the method will be described below, the format: <param name = "param_name" > value </ param >;
5. the <returns> is used to define the return value, a method for, after the /// input, automatically added <summary>, <param> and list <returns>;
6. the <Exception> defined may throw exception, the format: <exception Cref = "IDNotFoundException">;
7. the <Example>


10. <include> is used to indicate an external XML comment;
II two Notes
1. <c> or <code> is mainly used for the code snippet;
2. <para>, is similar in HTML <p> tags, It is the segment;
3. <pararef> used to refer to a parameter;
similar 4. <see> role <seealso>, other methods may be indicated;
5. the <list> is used to generate a list;
in addition, also from Custom XML tags

Reprinted to https://www.cnblogs.com/liuyaozhi/

 
 

 

 

Guess you like

Origin www.cnblogs.com/thebrave/p/11899729.html