суббота, 1 сентября 2012 г.

Replace Line Breaks in a String C#


Use replace with environment.newline
myString = myString.Replace(System.Environment.NewLine, "replacement text")
As mentioned in other posts, if the string comes from another environment (OS) then you'd need to replace that particular environments implementation of new line control characters.

Комментариев нет: