Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is \n equivalent to Environment.NewLine in .NET? [duplicate]

Tags:

c#

.net

newline

Possible Duplicate:
Difference between “\n” and Environment.NewLine

Hello all!

The way I understand it, when we use . symbol in format string for double, it doesn't mean "dot", it actually means "decimal separator used in current environment", so if we are working with non-US culture settings, the output can be 2,00 instead of 2.00. That's quite handy.

Now, is it also true for \n (LF) special symbol? Will it become System.Environment.NewLine symbol when the format string gets parsed or will it always be 0x0A value regardless of system settings? Environment.NewLine is kinda wordy and I wonder if I can just use \n safely instead.

Thanks in advance.

like image 564
Dyppl Avatar asked Jun 04 '11 22:06

Dyppl


1 Answers

This is may be your answer Difference between "\n" and Environment.NewLine

like image 133
jams Avatar answered Sep 21 '22 20:09

jams