equivalent of vbCrLf in c#

Luca Romagnoli picture Luca Romagnoli · Mar 8, 2010 · Viewed 109.9k times · Source

I have a to do this:

AccountList.Split(vbCrLf)

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

thanks

Answer

David picture David · Mar 8, 2010

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.