O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 21. XML Documentation Tag Reference

Table 21-1 lists the predefined set of XML tags that can be used to mark up the descriptive text. Table 21-2 lists possible prefixes for type and member cross-references.

Table 21-1. Predefined XML tags

TagDescription
<summary>
<summary>description</summary>

Describes a type or member. Typically, this contains the description of a member at a fairly high level.

<remarks>
<remarks>description</remarks>

Provides additional information regarding a particular member. Information about side effects within the method, or particular behavior that may not otherwise be intuitive (such as the idea that this method may throw an ArrayOutOfBoundsException if a parameter is greater than 5) should be listed here.

<param>
<param name="name">description</param>

Describes a parameter on a method. The name attribute is mandatory and must refer to a parameter on the method. If this tag is applied to any parameter on a method, all parameters on that method must be documented. You must enclose name in double quotation marks ("").

<returns>
<returns>description</returns>

This tag describes the return values for a method.

<exception>
<exception [cref="type"]>description</exception>

Describes the exceptions a method may throw. If present, the optional cref attribute should refer to the type of exception. You must enclose type in double quotation marks ("").

<permission>
<permission [cref="type"]>description</permission>

Describes the permission requirements ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required