LF vice CR-LF

  • Thread starter Thread starter Harry J. Smith
  • Start date Start date
H

Harry J. Smith

The text file I generate with my C# programs have lines that end with a LF (line-feed 0A) instead of a CR-LF (0D0A) that I am used
to. Is there any downside to this?

-Harry
 
Harry said:
The text file I generate with my C# programs have lines that end with a LF (line-feed 0A) instead of a CR-LF (0D0A) that I am used
to. Is there any downside to this?

try with Environment.Newline

string str = "hello" + Environment.Newline ;
 
I used the Environment.NewLine and my generated text files are now processed by Notepad and Word just fine. I still needed to use
"\n" when scanning the contents of a textbox. A "\r\n" sent to a textbox ends up as a "\n".

-Harry
 
Back
Top