1

I have the following code block.

    /// <summary>
    /// AMethod produces this XML:
    /// <A><B></B></A>
    /// </summary>
    public void AMethod()
    {
    }

When I do this IntelliSense does not print the XML, if I hover over AMethod. How do I get it to print the XML?

Azhar Kiani
  • 323
  • 4
  • 11
Daniel Ball
  • 1,613
  • 2
  • 11
  • 14

2 Answers2

6

You need to escape the XML

    /// <summary>
    /// AMethod produces this XML:
    /// &lt;A&gt;&lt;B&gt;&lt;/B&gt;&lt;/A&gt;
    /// </summary>
    public void AMethod()
    {
    }

This will then render the IntelliSense as follows:

enter image description here

Rob
  • 1,407
  • 2
  • 15
  • 22
4

The easiest way is to use a CDATA section:

    /// <summary>
    /// <![CDATA[
    /// <A><B></B></A>
    /// ]]>
    /// </summary>
Joe
  • 122,218
  • 32
  • 205
  • 338