Question

Before all I want to clarify that this question is about VB.NET, not C#, this question is not a duplicate because any solution worked from here How to add a line break in C# .NET documentation or Adding line breaks to comments for Intellisense (at least on VS2012).

I would like to add an empty line to display the Intellisense information like this:

Public Enum StringCase As Short

''' <summary>
''' LowerCase
''' (Empty line)
''' [Example]   + (line break)
''' Input : ABC + (line break)
''' Output: abc
''' </summary>
Lower = 0

End Enum

UPDATE:

A test of the breakline tag on VS2012 Ultimate (with and without official updates), in Windows 8 x64, using light and dark theme.

enter image description here

Was it helpful?

Solution

My first thought is to use

<para>foo</para>

as this was available in VS2008 for the comments http://social.msdn.microsoft.com/Forums/en-US/5dce48f5-d810-46bd-bb9b-6d0478174cf2/xml-comments-how-to-insert-a-new-line?forum=csharpide

Have you looked at putting your comment inside a CDATA or similar to try and preserver the whitespace?

http://msdn.microsoft.com/en-us/library/vstudio/ms255811(v=vs.100).aspx

IIRC it's more of a formatting thing for the IDE however, I think a doc generation tool like Doxygen observes the whitespace

OTHER TIPS

You can use HTML <br/> tag to create empty lines and make line breaks.

This works in C#

    /// <summary>
    /// LowerCase
    /// <br/><br/>
    /// [Example]<br/>
    /// Input<br/>
    /// Output<br/>
    /// </summary>

In VB it should like:

    ''' <summary>
    ''' LowerCase
    ''' <br/><br/>
    ''' [Example]<br/>
    ''' Input<br/>
    ''' Output<br/>
    ''' </summary>

If you enclose the lines you want to break in "para" tags it should do what you want.

''' <summary>
''' LowerCase
''' <para></para>
''' <para>[Example]</para>
''' <para>Input</para>
''' <para>Output</para>
''' </summary>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top