Finding last full line in a text file

white1827

New member
Joined
Jun 28, 2003
Messages
1
I am writing a program that searches for the last full line in a .txt file and then uses the speach sdk to convert the text to audio.

However, I cant seem to figure out a way to get the last line of data from the text file. Anyone have any suggestions?
 
Try something like this:
Code:
Dim reader As new IO.StreamReader("pathtofile")
Do While reader.Read()
    reader.ReadLine()
    If reader.Peek = 0 Then
            it was last line
    End If
Loop
 
Back
Top