Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 777
  • Last Modified:

FILE IO in C#

How do you write the equivelent in C#?

while (!streamreader.eof())
{
      // do something
}

the eof function doesnt seem to exist in C#
0
pmesick12345
Asked:
pmesick12345
1 Solution
 
tgannettsCommented:
while((strLine = sr.ReadLine())!=null)
{
Console.WriteLine(strLine);
                        }
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now