S
Sacha Korell
How would I check for an end of file when parsing a text file using the
StreamReader object?
I would like to do something like this:
'********************************
Dim objStreamReader As StreamReader
Dim strReqLine As String
objStreamReader = File.OpenText("data.txt")
While NOT objStreamReader.EOF
strReqLine = objStreamReader.ReadLine
'* Code to parse the line for data
End While
'********************************
Except the StreamReader object doesn't seem to have an EOF property. Are
there any work-arounds?
Thanks,
Sacha
StreamReader object?
I would like to do something like this:
'********************************
Dim objStreamReader As StreamReader
Dim strReqLine As String
objStreamReader = File.OpenText("data.txt")
While NOT objStreamReader.EOF
strReqLine = objStreamReader.ReadLine
'* Code to parse the line for data
End While
'********************************
Except the StreamReader object doesn't seem to have an EOF property. Are
there any work-arounds?
Thanks,
Sacha