Welcome to MSDN Blogs Sign in | Join | Help
StreamReader to end of file

Here's some code for reading through a StreamReader one line at a time until EOF (where line is a string and sr is a StreamReader):

while ((line = sr.ReadLine()) != null)
{

   //your code here
}

Posted: Monday, February 07, 2005 6:31 PM by ejarvi
Filed under:

Comments

Anonymous comments are disabled
Page view tracker