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[i]=='\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
"Tony Caduto" <ac*****@amsoftwaredesign.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Does anyone know of a example on how to read \r\n (CRLF) delimited line
without using the streamreader class?
Thanks,
--
Tony Caduto
Inexpensive Corporate Messaging
AM Software Design
http://www.amsoftwaredesign.com