I am trying to join two lines in a text file and write as one line without a line feed,but the combined line is being forced to several line feeds.
What I have on original file:
[line1:abcdefghijklm CR
line2:nopqrstuvwxyz CR
CRLF]
What i need:
[output:abcdefghijklmnopqrstuvwxyz
CRLF]
What I am currently getting:
[output:abcdefghijklmnopq CRLF
rstu CRLF
vwxyz CRLF]
Line 2 gets joined to line 1 ok,but then line two gets broken into several line feeds.
I have tried replace method on ("\r","") but the output is still the same,irregardless of the text editor that i use,i.e notepad++,ultrastudio,notepad and visual studio.
Please advise,see code below,this is after reading both lines:
line2.TrimStart();
line2.Replace("\r","");
output=line1.TrimEnd+" "+line2;
filewrite.WriteLine(output);