Adding line breaks to comments for Intellisense

.NetIntellisenseCode Documentation

.Net Problem Overview


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!)

.Net Solutions


Solution 1 - .Net

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.

Solution 2 - .Net

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.

Solution 3 - .Net

/// <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>

Solution 4 - .Net

Your only hope is probably something cludgy like this:

/// <summary>
/// <para>line one</para>
/// <para>_</para>
/// <para>line two</para>
/// </summary>

Solution 5 - .Net

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionfleshView Question on Stackoverflow
Solution 1 - .NetBrian KimView Answer on Stackoverflow
Solution 2 - .NettheKRAYView Answer on Stackoverflow
Solution 3 - .NetAl EricksonView Answer on Stackoverflow
Solution 4 - .NetAndrew HareView Answer on Stackoverflow
Solution 5 - .NetJoel CoehoornView Answer on Stackoverflow