Doxygen: XML Commands (original) (raw)
Doxygen supports most of the XML commands that are typically used in C# code comments. The XML tags are defined in Appendix D of the ECMA-334 standard, which defines the C# language. Unfortunately, the specification is not very precise and a number of the examples given are of poor quality.
Here is the list of tags supported by Doxygen:
| XML Command | Description |
|---|---|
| Identifies inline text that should be rendered as a piece of code. Similar to using text. | |
|
Set one or more lines of source code or program output. Note that this command behaves like \code ... \endcode for C# code, but it behaves like the HTML equivalent ... for other languages. |
| Part of a command, describes an item. | |
| Marks a block of text as an example, ignored by Doxygen. | |
| Identifies the exception a method can throw. | |
| Can be used to import a piece of XML from an external file. Ignored by Doxygen at the moment. | |
| Can be used to insert the documentation of a member of a base class into the documentation of a member of a derived class that reimplements it. | |
| List item. Can only be used inside a context. | |
| Starts a list, supported types are bullet or number and table. A list consists of a number of tags. A list of type table, is a two column table which can have a header. | |
| Starts the header of a list of type "table". | |
| Identifies a paragraph of text. | |
| Marks a piece of text as the documentation for parameter "paramName". Similar to using \param. | |
| Refers to a parameter with name "paramName". Similar to using \a. | |
| Identifies the security accessibility of a member. Ignored by Doxygen. | |
| Identifies the detailed description. | |
| Marks a piece of text as the return value of a function or method. Similar to using \return. | |
| Refers to a member. Similar to \ref. | |
| Starts a "See also" section referring to "member". Similar to using \sa member. | |
| In case this tag is used outside a tag this tag identifies the brief description. Similar to using \brief. In case this tag is used inside a tag this tag identifies the heading of the tag. |
|
| Part of a command. | |
| Marks a piece of text as the documentation for type parameter "paramName". Similar to using \param. | |
| Refers to a parameter with name "paramName". Similar to using \a. | |
| Identifies a property. Ignored by Doxygen. | |
| <![CDATA[...]]> | The text inside this tag (on the ...) is handled as normal Doxygen comment except for the XML special characters <, > and & that are used as if they were escaped. |
Here is an example of a typical piece of code using some of the above commands:
class Engine
{
public DataSet Search(string connectionString, int maxRows, int searchString)
{
DataSet ds = new DataSet();
return ds;
}
}