4

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

Community
  • 1
  • 1
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
  • Possible duplicate of [Multiline XML Comments in VB.Net and Visual Studio Intellisense](http://stackoverflow.com/questions/7070737/multiline-xml-comments-in-vb-net-and-visual-studio-intellisense) – Hans Passant Nov 17 '13 at 21:05
  • 1
    @Hans Passant just an offtopic: I'm sure that if you don't know the way to do it, then does not exists any possible way to do it. But the weird thing is that the Visual Studio Product Team closed that question from the link of the comment without apporting any solution!. – ElektroStudios Nov 18 '13 at 15:43
  • Consider using ReSharper. It properly displays XML doc comments (it supports both `br` and `para`, IIRC) and contains many more features which will improve your productivity. VS without R# sucks. – Athari Nov 23 '13 at 01:43

3 Answers3

3

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>
chue x
  • 18,573
  • 7
  • 56
  • 70
Humanier
  • 274
  • 2
  • 11
  • Sorry but it seems VB.NET doesn't support formatting tags for some reason. Who could have imagined. – Humanier Nov 20 '13 at 02:57
  • @edokan not for me http://img41.imageshack.us/img41/3343/9t3h.jpg tested on VS2012 Ultimate (with and without official updates) in Windows 8 x64. tested it on light and dark themes. can you give more details of your envoirement? – ElektroStudios Nov 21 '13 at 12:27
  • @ElektroStudios it may be actually my bad. I was using WS2012 on W7 x64, but I also have ReSharper 8 EAP installed which changes the game. sorry for the confusion. – Erdogan Kurtur Nov 21 '13 at 12:30
  • My environment is VS2010 / Resharper 7.1 – Humanier Nov 21 '13 at 17:01
3

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

finman
  • 545
  • 6
  • 16
  • Tried but does not solved the problem, my CDATA summay line is ignored by intellisense: `''' <![CDATA[ something ]]>` maybe I'm doing it wrong. – ElektroStudios Nov 21 '13 at 12:22
2

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>