Comments are not for the compiler to see, but for programmers. is a way of communicating between programmers. Good programmers must have sound comments.
. NET annotation type.
1. Single-line comment//
A. When the lines of code are shorter, comments can be placed behind the code.
B. When the line of code is longer, the comment must be placed on top of the comment code, not below.
C. Shortcut keys: Select the code you want to annotate,
Note: Ctrl k +ctrl C
Uncomment: Ctrl k + CTRL U
2. Multiline comment/* */
A. Multi-line annotations cannot be nested.
3. Documentation Comments//
A. Shortcut keys enter three consecutive slashes ("///") on the top of the method header, class, enumeration, interface
VS will automatically add a document comment to us.
B. When we reference an object of a class that has a document comment, point to a method, or hover over it, to show the contents of the document's comments.
c///<summary>
Description of the function
</summary>
<param name= "parameter name" > Description of Parameters </param>
<return> return Value Description </return>
--------------------------------------------------------------------------------------------------------------
_ooooo_//o8888888o//88 ". "88//(| -_- |) o\ =/o//____/'---' \____//. ' \\| |//'.///\\| | | : ||| // // / _||||| -:- ||||| - // | | \\\ - /// | |// | \_| ' \---/' | |//\-\__ '-' ___/-. /// ___`. . '/--.--\ '. . __// ."" ' < '. ___\_<|>_/___. ' > ' ".//| | : `- \`.; `\ _ /`;. `/ - ` : | |// \ \ `-. \_ __\/__ _/.-'////\ ====== '-.____ '-.___\_____/___.-' ____.-' ======//' =---= '//// .....//.....//.....//......//Buddha-Town Building Bug----------------- Office Building, writing Room programmer;//program staff write procedures, and take the program for drinks. Sober only sit on the internet, drunkAlso to the net sleep,//drunk Awake day after day, online network next year. I hope the old computer, do not want to bow to the boss before;//Mercedes-Benz BMW is interesting, bus self-programmers. Others laugh at me crazy, I laugh at my life is too cheap,//Don't see the street pretty sister, which is the programmer?
. NET annotation types, single-line comments, multiline comments, document comments ...