need a snippet of code which would read out last \"n lines\" of a log file. I came up with the following code from the net.I am kinda new to C sharp. Since the log file migh
This is in no way optimal but for quick and dirty checks with small log files I've been using something like this:
List mostRecentLines = File.ReadLines(filePath) // .Where(....) // .Distinct() .Reverse() .Take(10) .ToList()