c# split string from newline code example
Example 1: c sharp split by newline
// To split a string by newlines, see below (requires 'System')
using System
text.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
Example 2: c# separate string by a new line
var result = mystring.Split(new string[] {"\\n"}, StringSplitOptions.None);