Best Practices

Write XML documentation for the people who use an API. Describe its contract and intent rather than restating its declaration.

Start with the Public Contract

Keep the summary short enough to scan in a member list. Put background, constraints, side effects, and usage guidance in <remarks>.

Make References Precise

Use <paramref> and <typeparamref> when referring to parameters so their names remain connected to the declaration. Use <see> for inline references and <seealso> for separate entries in the generated See Also section.

Use <inheritdoc /> when an implementation genuinely shares an inherited contract. Add local documentation when the implementation changes behavior, constraints, or exceptions.

Link API comments to guides when a concept is too large for a member description. See Conceptual Topics for topic-reference forms.

Structure Longer Content

Use <para> to divide prose into readable paragraphs and <list> for real sequences, choices, or tables. Keep block content such as <code>, <list>, and <note> out of inline elements and table cells.

For Markdown output, a <list type="table"> needs a <listheader> so the result has a valid header row. Keep table-cell content to one paragraph with inline formatting because Markdown tables do not reliably support blocks or line breaks in cells.

Review for Usefulness

Before publishing, check that documentation:

See Also