What is the use of XML comments in C #

What is the use of XML comments in C # than a signal line and a few lines.

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

ii. Multiple line (/* */)
Eg:
 /*This is a multiple line comment
We are in line 2
Last line of comment*/

iii. XML Comments (///).
Eg:
/// summary;
///  Set error message for multilingual language.
/// summary
+4
source share
6 answers

From Comments on XML Documentation (C # Programming Guide):

When compiling with the / doc option, the compiler will look for all the XML tags in the source code and create an XML documentation file.

Also XML comments used by Visual Studio for IntelliSense:

/// <summary>
///  This class performs an important function.
/// </summary>
public class MyClass{}

They will give you nice hints when you enter the code or hover over an element with xml comments:

enter image description here

. xml . , , . GhostDoc ( Visual Studio), XML . , - , .

(-xml) . , , . :

  • , (, )
  • ( ). , , .

, , .

+11

XML, ///, IntelliSense, , . MSDN, , .

, ..

+1
+1

XML API, . IntelliSense ( "" ).

() XML ; .

, - JavaDoc. , Microsoft .

+1

Dll assambly Xml, dll -.

0

. , . .

# Microsoft, XML, , - . .

. doxygen, JavaDoc . . Sandcastle MSDN

0

Source: https://habr.com/ru/post/1526537/


All Articles