I need to split a string into newlines in .NET and the only way I know of to split strings is with the Split method. However that will not allow me to (easily) split on a ne
Based on Guffa's answer, in an extension class, use:
public static string[] Lines(this string source) { return source.Split(new string[] { "\r\n", "\n" }, StringSplitOptions.None); }