code

NDoc3

The <code> is used to indicate multiple lines as code.

<code [lang="language"][escaped="true"]>content</code>

where:

lang="language" [NDoc3 extension]
Applies a filter for this language. (Optional)
escaped="true" [NDoc3 extension]
Escapes all reserved characters within content. (Optional)
content
The text you want marked as code.

Applies To

Can be used inline within any other markup.

Remarks

A language filter can be attached using the optional lang attribute. Standard languages are Visual Basic, C#, C++ and JScript. Multiple languages can be specified as a comma separated list such as "Visual Basic, C#, C++".

The escaped attribute can be used to escape all reserved characters within the text.

Note:  All content within xml comments must be well-formed!!!

Example

Note how, in the following comments, the xml text can be entered verbatim because the escaped="true" attribute has been applied.

   [C#]
   /// <summary>
   /// Loads the XML.
   /// </summary>
   /// <example> The XML should have the following format.
   /// <code escaped="true">
   ///   <root>
   ///     <member name="name"/>
   ///   </root>
   /// </code>
   /// </example>
   public void LoadXml(string xml) 
   {
      //do something here...
   }