I am getting a string from database field named \'Description\' and it has line breaks. It looks like this:
Header of Items
Description goes here.This the
For removal of all newlines, regardless of environment or badly formed strings, I think that this is the simplest option:
var singleLineString = multilineString.Replace("\r", string.Empty).Replace("\n", string.Empty);