new lines in text string

M

Mike

Hi,

I have this app that downloads a webpage via a WebClint object. It then
strips out all the unnecessary tags so that I have data that looks similiar
to

11/1/05,1,2,3,4,5,6\n11/2/05,2,3,4,5,6\n11/3/05,3,4,5,6,7\n

There are actual newline charactes in the data. When I write it to a file
the newlines are enabled so to speak and the data looks ok.

What I would like to do is load that long text stream into a
stringcollection container and have each real record a separate string in
the container.

Is there a way to do that automatically without having to parse thru
searching for every occurrance of '\n' or is that it?

I think its the latter but wanted to be surprised.

Thanks alot.
 
M

Mike

ok I think I need to do something like this

Stream strm = m_WebClient.OpenRead(strURL);
StreamReader sr = new StreamReader(strm);
string line;
do
{
line = sr.ReadLine();
.....

Stupid me, should of looked harder before posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top