I would like to insert the following into a string
some text here some text here some text here
some text here
You can also try:
string res = string.Join("", sample.Split(Environment.NewLine.ToCharArray())
Environment.NewLine should make it independent of platform.
Environment.NewLine Property