Maziar,
You should refactor the logic part of your application so that your
function takes a TextReader. Once you have that, you can take your
FileStream and then wrap it in a StreamReader, and pass it to your function.
This way, if you want to pass the string contents to the function, you can
just pass the string through a StringReader instance and the function will
accept it (it acts like a stream, allowing you to read character after
character from the string you pass in).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Maziar Aflatoun" <ma***@rogers.com> wrote in message
news:Re********************@rogers.com...
Hi,
I have a little application that reads a text file line-by-line and
processes each line depending on the CVS values. Now I want to change my
program to capture this from a textbox. How do I parse a string
line-by-line? Just like a file?
Thanks
Maz.