Skip to content

Environment.NewLine instead of \n in C# #122

Answered by christiannagel
ShervanN asked this question in Q&A
Discussion options

You must be logged in to vote

Hello Shervan, thanks for asking!

The new line character is different based on the platform. See this Wikipedia article - newline.

Environment.NewLine returns \r\n with Windows, and \n with Linux.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ShervanN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants