I have a text file which is continuously being updated from the Server data ..Now as per my requirement i have to read the last line added into the text file and show it into the windows form application text box.Once new line is added into the text file it should read that line and show into the text file .. Please help me with your valuable suggestions. Thanks in advance..

有帮助吗?

解决方案

You can use FileSystemWatcher class to monitor any changes to the file you are interested in (you can use Filter property to limit this watcher to single file).
As for reading the last line from it you can use either of these approaches one, two.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top