Compartir a través de


XML Documentation Tags

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

In X++, you can document the code you write by using XML comments. This topic describes the tags that are used in the XML comments.

Tags Used in XML Comments

When you write XML comments, you must follow specific guidelines. Microsoft Dynamics AX conducts a best practices check of the XML comments to make sure that you provide documentation in tags that are required (the <summary> tag), and that the parameter documentation matches the parameters listed in the syntax. For information about best practice errors, see Best Practices: XML Documentation.

Cc607340.collapse_all(en-us,AX.60).gifDocumenting Methods

The following XML tags are used to document methods in the source code.

XML tag

Description

<summary>

The summary should provide a brief description of the method. All documented methods should have a summary.

<param>

The parameter tag is used to describe the parameters of the method. Parameter tags are inserted into the header template if parameters are in the syntax. The name of the parameter is inserted into the parameter tag. The parameter description should be brief.

<returns>

The returns tag is used to describe the value that the method returns. This tag is inserted into the header template if a return value is in the syntax of the method.

<remarks>

The remarks tag can be used to provide information beyond what is documented in the other tags.

<exception>

The exception tag is used to describe the conditions that cause exceptions to be thrown by a method. This tag is inserted into the header template when it is appropriate.

<permission>

The permission tag is used to describe the permission that is required to access methods using the CodeAccessSecurity.demand method.

<seealso>

The see also tag is used to provide links to related information.

For information about how to add XML documentation to the source code, see How to: Add XML Documentation to X++ Source Code.

Cc607340.collapse_all(en-us,AX.60).gifDocumenting Classes

The following XML tags are used to document classes in the source code. You can document classes by adding an XML header template to the classDeclaration code of the class that you want to document. An XML header template precedes X++ code and contains the XML documentation that describes the code.

XML Tag

Description

<summary>

The class summary should provide a brief description of what the class is used for. All documented classes should have a summary.

<remarks>

The remarks tag can be used to provide information beyond what is documented in the summary.

For information about how to add XML documentation to the source code, see How to: Add XML Documentation to X++ Source Code.

See also

XML Documentation

XML Documentation Overview

How to: Generate XML Documentation Files

Walkthrough: Creating XML Documentation in Microsoft Dynamics AX

Best Practices: XML Documentation

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.