Lecture overview -- Keyboard shortcut: 'u'  Previous page: A documentation example in C# -- Keyboard shortcut: 'p'  Next page: Tool support: The C# Compiler -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 6 : 13
Object-oriented Programming in C#
Documentation of Object-oriented Programs
The XML Documentation Language for C#

The elements of the C# documentation language

 

  • <summary> summary text </summary>

    • Describes types as well as type members

  • <remarks>description</remarks>

    • Additional information about a type, supplementing the information specified in a summary.

  • <param name="p">parameter description</param>

    • Description of the parameter p

  • <value>property-description</value>

    • Documents a property (the value which is represented by the property)

  • <typeparam name="name">description</typeparam>

    • Documents a type parameter of a generic type or method

  • <returns>description</returns>

    • Describes the return value of a method

  • <example>description</example>

    • An example of how to use a method. May contain code elements

  • <c>text</c>

    • Text indicated/emphasized as code

  • <code>text</code>

    • Text indicated/emphasized - multiple lines of code

  • <exception cref="e">description</exception>

    • Documents the exception e

  • <include file='filename' path='tagpath[@name="id"]' />

    • Include part of another documentation file in the current documentation.

    • Relies on XPath expressions.

  • <list> ... </list>

    • A bullet list facility. Can be used in summaries.

    • Relies on additional nested elements such as <listheader> ... </listheader> and <item> ... </item>

  • <para>content</para>

    • A paragraph. Used within summaries and remarks for markup of a paragraph.

  • <paramref name="name"/>

    • Used for references to parameters within summary or remarks

  • <see cref="member"/>

    • A reference to a member

  • <seealso cref="member"/>

    • Contributes to a separate "See also" clause of the documentation

  • <typeparamref name="name"/>

    • Format the name of a type parameter in distinct way.

 

In addition to the XML elements mentioned above you can invent and use your own "tags"