How to add a line break in C# .NET documentation
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>
Inserting A Line Break (Not A Paragraph Break) Programatically To A Word Document
It turns out that Word uses Vertical Tabs for its line breaks. I was able to add them using the "\v" character to ranges. See What is a vertical tab? for more details.
NewLine in object summary
You want to use some thing like this
/// <summary>
/// Your Main comment
/// <para>This is line 1</para>
/// <para>This is line 2</para>
/// </summary>
public bool TestLine { get; set; }
C# Encoding a text string with line breaks
Yes - it means you're using \n
as the line break instead of \r\n
. Notepad only understands the latter.
(Note that Environment.NewLine
suggested by others is fine if you want the platform default - but if you're serving from Mono and definitely want \r\n
, you should specify it explicitly.)
Related Topics
How to Parse Very Huge Xml Files in C#
How to Save Picturebox.Image to File
Handling the Window Closing Event with Wpf/Mvvm Light Toolkit
Getting Hash of a List of Strings Regardless of Order
Add Separator to String at Every N Characters
Measure a String Without Using a Graphics Object
Dataview.Sort - More Than Just Asc/Desc (Need Custom Sort)
How to Get Information About Recently Connected Usb Device
What Exactly Is an Assembly in C# or .Net
How to Group Windows Form Radio Buttons