Pregunta

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..

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top