You mean something like this?
<code>
using System;
public class Test
{
public static void Main()
{
string text = "this is line1\r\nthis is line2 \r\nthis is line3\r\n";
int start = 0;
for(int i=0;i<text.Length-1;i++)
{
if (text=='\r' && text[i+1]=='\n')
{
int length = i-(start);
if (length>0)
{
string line = text.Substring(start, length);
Console.WriteLine(line);
}
start = i+2;
}
}
}
}
</code>
However, the ReadLine method of StreamReader (and StringReader) does pretty
much the same thing..
/Johan