Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a line break in C# .NET documentation

This should be waaaay easier...

I want to add a "coded" line break to the XML documentation in my code

/// <summary> /// Get a human-readable variant of the SQL WHERE statement of the search element. &lt;br/&gt; /// Rather than return SQL, this method returns a string with icon-tokens, which  /// could be used to represent the search in a condensed pictogram format. /// </summary> 

As you can see, I found some answers that demonstrated adding < and > brackets. Interestingly, the good 'ol < br/ > line break does not create a line break in the Intellisense popup.

I find this annoying...

Any suggestions?

like image 539
Tinkerer_CardTracker Avatar asked Sep 02 '11 04:09

Tinkerer_CardTracker


People also ask

Can you break lines in C?

There is a character for that. It's called "newline". You can't put it directly in the string because that would create a new line in the source code, but inside quotes in C you can produce it with \n .

How do I add a new line in C?

The escape sequence \n means newline. When a newline appears in the string output by a printf, the newline causes the cursor to position to the beginning of the next line on the screen.

What is line break in C language?

The newline character ( \n ) is called an escape sequence, and it forces the cursor to change its position to the beginning of the next line on the screen.

What is the use of \n in C?

\n (New line) – We use it to shift the cursor control to the new line. \t (Horizontal tab) – We use it to shift the cursor to a couple of spaces to the right in the same line.


1 Answers

You can use a <para /> tag to produce a paragraph break or you can wrap text in <para></para> tags as a way to group the text and add the blank line after it, but there is no equivalent to <br /> or anything like that. (Which according to this old MS forum post is by design.) You can get the list of available tags in this documentation article from MS. Documenting your code

Example (based on original OP sample):

/// <summary> /// <para>Get a human-readable variant of the SQL WHERE statement of the search element.</para> /// Rather than return SQL, this method returns a string with icon-tokens, which  /// could be used to represent the search in a condensed pictogram format. /// </summary> 
like image 127
pstrjds Avatar answered Sep 22 '22 15:09

pstrjds