Recommended Tags for Documentation Comments (C# Programming Guide)

 

Updated: July 20, 2015

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

The C# compiler processes documentation comments in your code and formats them as XML in a file whose name you specify in the /doc command-line option. To create the final documentation based on the compiler-generated file, you can create a custom tool, or use a tool such as Sandcastle.

Tags are processed on code constructs such as types and type members.

System_CAPS_ICON_note.jpg Note

Documentation comments cannot be applied to a namespace.

The compiler will process any tag that is valid XML. The following tags provide generally used functionality in user documentation.

<c><para><see>*
<code><param>*<seealso>*
<example><paramref><summary>
<exception>*<permission>*<typeparam>*
<include>*<remarks><typeparamref>
<list><returns><value>

(* denotes that the compiler verifies syntax.)

If you want angle brackets to appear in the text of a documentation comment, use < and >, as shown in the following example.

/// <summary cref="C < T >">  
/// </summary>  

C# Programming Guide
/doc (C# Compiler Options)
XML Documentation Comments

Show: