It’s easy to read a string one line at a time.  Here is a console program that demonstrates how:

using System;
using System.IO; 

namespace CSharp411
{
    class Program
    {
        static void Main( string[] args )
        {
            string text = "Hello\nGoodbye, world\n\nDon't have a cow";
            using (StringReader reader = new StringReader( text ))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    Console.WriteLine( line );
                }
            }
            Console.ReadLine();
        }
    }
}

Popularity: 24% [?]

Related posts:

  1. C# Read Text File Line-by-Line
  2. C# Convert String to Stream, and Stream to String
  3. C# Read Text File into String
  4. Read a Web Page in C#
  5. Read File into Byte Array