Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27348

[RESOLVED] Read last 200 lines of a text file

$
0
0
I'm trying to read the last 200 lines of a text file - however the following returns a single line (line number 200 from the end of the file) instead of the last 200 lines

Code:

Dim lines As String() = IO.File.ReadAllLines(Strings.LogFile)
            logresults = lines.Length - 200

How do i read the last 200 lines of the file?

Viewing all articles
Browse latest Browse all 27348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>