What you get from RichTextBox.Lines are exactly the lines that the user has entered. It's not about paragraphs, but where a new line (an Enter) exists in the text. The way it looks in the screen is a rendering detail. If you break the text the way it looks in the DB, and then the user resizes the form so that more text fits in a line, how are you going to put that together again? My advice: forget about it. Rely on the implementation of Lines property. It works. It's the logical thing to do. The visual rendering of the text as a paragraph is not important.
Dig Deeper on Win Development Resources
Related Q&A from Daniel Cazzulino
Here Daniel Cazzulino explains how to load a DSL (domain specific language) domain model instance file programmatically. This requires the .NET type ... Continue Reading
Here we offer a glimpse at 12 of .NET development expert Danny Cazzulino's top ASP.NET questions and answers. Continue Reading
C# developers should NOT be modifying InitializeComponent method in the code-behind (or any of the variable definitions) by hand. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.