Adding line breaks to c# comments for Intellisense

Does anyone know how to insert a line break into a summary comment in order for the line break to be reflected in Intellisense documentation?

To clarify, assume code documentation..

/// <summary>
/// Some text documentation
///  - a line break -
/// Some more documentation
/// </summary>
public void SomeMethod() { }

So when using this method Intellisense offers a summary for the method formatted like this:

Some text documentation

Some more documentation

(Note - the 'para' tag doesn't create empty line breaks - I've tried it!)

30735 次浏览

Try using this.

/// <summary>
/// <para>Paragraph 1.</para>
/// <para>Paragraph 2.</para>
/// </summary>

But I don't think you can have an actual empty line. Empty para tag gets ignored.

Well, it is Xml. Maybe &#10;&#13;

Your only hope is probably something cludgy like this:

/// <summary>
/// <para>line one</para>
/// <para>_</para>
/// <para>line two</para>
/// </summary>
/// <summary><br />
/// <para>To treat comment line like a DIV tag, surround them with PARA tags.</para><br />
/// <para>To add a break with whitespace, add the following line:</para><br />
/// <para>&#160;</para><br />
/// </summary>

Try this:

/// <summary>
/// <para> [Non-Breaking Space] </para>
/// </summary>

[Non-Breaking Space] is obtained using Alt+255 (using the Numpad).

It will show up as an empty new line. I know this is old, but it worked for me today.