Checking for EOF with Streamreader
- From: Lyle<nospam@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 22 Sep 2005 16:53:41 GMT
Hi. What is the best way to check for EOF when using the streamreader? I am using a do loop. Following is what I have tried but all end in an error when eof is reached.
1. Adding 'until line is nothing' to the end of the loop.
2. Adding 'while not line is nothing' after the do.
3. After the line is read in the do coding:
If line Is Nothing Then
Exit Do
End If
Thanks for your help!
>From http://www.developmentnow.com/g/38_2005_8_0_22_0/dotnet-languages-vb.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
.
- Follow-Ups:
- Re: Checking for EOF with Streamreader
- From: Herfried K. Wagner [MVP]
- RE: Checking for EOF with Streamreader
- From: lyle
- Re: Checking for EOF with Streamreader
- From: Chris Dunaway
- Re: Checking for EOF with Streamreader
- From: Siva M
- Re: Checking for EOF with Streamreader
- Prev by Date: Re: A simple TEXTBOX question
- Next by Date: Re: Modifying the system clock
- Previous by thread: Re: A simple TEXTBOX question
- Next by thread: Re: Checking for EOF with Streamreader
- Index(es):
Relevant Pages
|