I have a need to get rid of all line breaks that appear in my strings (coming from db). I do it using code below:
value.Replace(\"\\r\\n\", \"\").Replace(\"\\n\"
If you've a string say "theString" then use the method Replace and give it the arguments shown below:
theString = theString.Replace(System.Environment.NewLine, "");