Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Carriage return or new line in xml comments

I am trying to find a way to put carriage returns/new lines in the xml comments of my properties. Right now, when the tip appears in intellisense, the line are all bunched up, making it hard to read: enter image description here

I'd like it to look like this:

enter image description here

Here's what the xml looks like:

///<summary>
///Question:
/// 'Are you sure you wish to delete the selected |Value|'
///<para>Replace |Value| with the entity name of choice.</para>
///</summary>
internal const string ConfirmEntityDelete = "Are you sure you wish to delete the selected |Value|?";

I understand that xml doesn't recognize whitespace so I can't use empty <para> tags. The only way I've had any luck is by using the para tags with a period <para>.</para>. It is visible in the tip but at least it makes it a tad more readable.

I've looked here http://msdn.microsoft.com/en-us/library/5ast78ax(v=vs.110).aspx and found all the tags that can be used, and have tried them all, but haven't had any luck.

Any help is greatly appreciated!

like image 449
Robert Avatar asked Oct 02 '22 15:10

Robert


1 Answers

Maybe something like this? It adds a carriage return but not an empty line though.

/// <summary> 
/// Your main comment 
/// <para>&#160;</para> 
/// <para>The rest of the comment</para> 
/// </summary> 
public void CommentMethod()
{
}

EDIT: Found and added character to display new line. I knew I had done something similar before.

like image 93
Mo Patel Avatar answered Oct 07 '22 18:10

Mo Patel