Read from a file starting at the end, similar to tail

前端 未结 4 815
长情又很酷
长情又很酷 2020-11-28 10:25

In native C#, how can I read from the end of a file?

This is pertinent because I need to read a log file, and it doesn\'t make sense to read 10k, to read the last

4条回答
  •  悲哀的现实
    2020-11-28 10:50

    Take a look at this related question's answer to read a text file in reverse. There is a lot of complexity to reading a file backward correctly because of stuff like encoding.

提交回复
热议问题