<qhelp>

<overview>

Public APIs (including methods, constructors, classes, structs and interfaces) should be documented to help make the API easier to understand and maintain. For the purpose of code maintainability, it is also advisable to document non-public APIs.

</overview> <recommendation>

Add appropriate documentation. The documentation comment should describe what the method or constructor does rather than how it does it, to allow for any potential implementation change that is invisible to users of an API. It should include the following:

- A `<summary>` tag giving a brief description of the class or method
- `<param>` tags to describe all arguments to methods and constructors
- A `<returns>` tag if the method returns a value
- `<exception>` tags for all exceptions thrown by the method
- `<typeparam>` tags for type parameters to classes and methods
- A description of any preconditions or postconditions
- Any other important aspects such as side-effects and thread safety

Documentation for users of an API should be written using the standard documentation format. This can be accessed conveniently by users of an API from within standard IDEs, and can be transformed automatically into HTML format.

</recommendation> <example>

The following example shows a fully documented class, illustrating the use of `<summary>`, `<param>`, `<returns>`, and `<exception>` tags.

</example> <references>

- MSDN, C# Programming Guide: XML Documentation Comments, How to: Use the XML Documentation Features, Recommended Tags for Documentation Comments.
</references> </qhelp>