What end-of-line identifier should I use (for example, for output to text files)?
There are many choices:
- vbCrLf
- vbNewLine (apparently an alias of vbCrLf)
- ControlChars.CrLf
- ControlChars.NewLine
- Environment.NewLine
- A static member in some C# class in the application (requires mixed-language solution): public static string LINEEND = " ";
Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10)
(generated by the Visual Studio designer, at least Visual Basic 2005 Express Edition, for a TextBox with property Multiline set to True when Shift + Return is used while editing property Text.)
What is best practice?
See Question&Answers more detail:os