Split String By Lines - CSharp System

CSharp examples for System:String Split

Description

Split String By Lines

Demo Code


using System.Text.RegularExpressions;
using System.Linq;
using System.Collections.Generic;
using System;/*  w  w w  .  j a va  2  s.  com*/

public class Main{
        public static IEnumerable<string> SplitByLines(string data)
        {
            return data.Split(new[] {"\r\n", "\n"}, StringSplitOptions.None);
        }
}

Related Tutorials