Search code examples
c#listsplitlanguage-comparisons

equivalent of vbCrLf in c#


I have a to do this:

AccountList.Split(vbCrLf)

In c# AccountList is a string. How can i do?

thanks


Solution

  • You are looking for System.Environment.NewLine.

    On Windows, this is equivalent to \r\n though it could be different under another .NET implementation, such as Mono on Linux, for example.