Replacing a line break is a simple challenge. In .NET there are plenty of ways to do that.
You can for example use String.Replace or Regex.Replace. My prefered method is String.Replace but both versions will do it.
String.Replace Method for c#
sampleString = sampleString.Replace(System.Environment.NewLine, "replacement string");
String.Replace Method for vb.net
sampleString = sampleString.Replace(System.Environment.NewLine, "replacement string")
Regex.Replace Method for c#
sampleString = Regex.Replace(sampleString, @"\r\n?|\n", "replacement string");
Regex.Replace Method for c#
sampleString = Regex.Replace(sampleString, "\r\n?|\n", "replacement string")
more informations can be found in the msdn Regex.Replace, String.Replace
I suggest:
sampleString = sampleString.Replace(sampleString, “r”, “”).Replace(sampleString, “n”, “replacement string”)
RT @CodeSnippetsNET: How to replace a line break in .NET http://t.co/0hpqCk9w1g #dotnet #csharp #vb# programming #coding #code
RT @CodeSnippetsNET: How to replace a line break in .NET http://t.co/0hpqCk9w1g #dotnet #csharp #vb# programming #coding #code