"Stephany Young" <noone@localhostschrieb:
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.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>