LF vice CR-LF

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
 
C

cyrille

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 ;
 
H

Harry J. Smith

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top