MBZ
MBZ

Reputation: 27632

C# get file change events

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

Upvotes: 1

Views: 1533

Answers (1)

Mitch Wheat
Mitch Wheat

Reputation: 300837

Have a look at the FileSystemWatcher Class

Upvotes: 3

Related Questions