title: Why is Environment.NewLine = "\r\n" when "\n" in a string literal functions the same?
body: <p>In C# if you do something like <code>string newLine = Environment.NewLine;</code> and inspect the value of <code>newLine</code> you'll find that it is <code>"\r\n"</code>. However, if I do something like;</p>
  
  <pre><code>  string[] test = new string[] { "one", "two", "three" };
  
    Console.WriteLine("With plain slash n:");
    Console.Write(String.Join("\n", test));
    Console.WriteLine("\nWith Environment.NewLine:");
    Console.Write(String.Join(Environment.NewLine, test));
  </code></pre>
  
  <p>The output is functionally the same.</p>
  
  <p>Why is <code>Environment.NewLine</code> set to <code>\r\n</code> instead of just <code>\n</code>? Doesn't that just make it more difficult to convert from string to character array? Also I read something which led me to believe some input fields don't count <code>Environment.NewLine</code> as two characters which could cause problems if your backing fields are restricted to the length of the input field. Are there any positive reasons for it? Is it just legacy cruft at this point?</p>