vbNewLine or ControlChars.NewLine

  • Thread starter Thread starter Lou
  • Start date Start date
Neither are more efficient as they are both constants.

But ...

Environment.NewLine

is more correct as it represents whatever a newline actually is on the
machine/OS where the program is executing.
 
cool!
Thanks.

Stephany Young said:
Neither are more efficient as they are both constants.

But ...

Environment.NewLine

is more correct as it represents whatever a newline actually is on the
machine/OS where the program is executing.
 
Stephany Young said:
Neither are more efficient as they are both constants.

But ...

Environment.NewLine

is more correct as it represents whatever a newline actually is on the
machine/OS where the program is executing.

I don't think it is "more correct" in general. Which one is more correct
depends on the exact scenario. Would you expect a Windows Forms
implementation for UNIX use CR+LF as Windows does or would you expect it to
use the system's "native" new line sequence? Note that data displayed in
controls, for example, can be loaded from resources too. Changing the new
line character sequence based on the system would make porting applications
between different operating systems harder.
 

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

Back
Top