Try: yourText.Split(Environment.NewLine.ToArray, StringSplitOptions.RemoveEmptyEntries). Hope it works!