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
}