C# get file change events

大兔子大兔子 提交于 2020-01-21 21:52:26

问题


I do have a program which logs some specific events in a text file (it keeps the file open).
Now I want to program a second application which shows these logs on a form.

can I set an event for any change in a text file which is opened by another process? or I have to read that regularly?

thanks


回答1:


Have a look at the FileSystemWatcher Class



来源:https://stackoverflow.com/questions/3948542/c-sharp-get-file-change-events

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!