What is the difference between two, if any (with respect to .Net)?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
As others have mentioned,
Environment.NewLine
returns a platform-specific string for beginning a new line, which should be:"\r\n"
(\u000D\u000A) for Windows"\n"
(\u000A) for Unix"\r"
(\u000D) for Mac (if such implementation existed)Note that when writing to the console, Environment.NewLine is not strictly necessary. The console stream will translate
"\n"
to the appropriate new-line sequence, if necessary.