What is the use of XML comments in C#

前端 未结 6 1855
没有蜡笔的小新
没有蜡笔的小新 2020-12-19 11:36

What is the use of XML comments in C# than signal line and multiple line comments.

i.Single line
Eg:
//This is a Single line comment

ii. Multiple line (/* *         


        
6条回答
  •  有刺的猬
    2020-12-19 12:32

    Code in all languages usually allows for special comments. These comments can then be parsed by a process which creates automatic documentation of the code. Many libraries are documented this way.

    In C# these tools are provided by Microsoft and you use the XML comments to declare that the comment should be picked up by the documentation process - if you have one set up. The comments are also picked up by auto complete.

    See also doxygen, JavaDoc for implementations for other languages. See related question Good alternatives to Sandcastle to generate MSDN-style documentation

提交回复
热议问题