Invoke the c# application if any update on shared file
Hi I am trying to create a c# window forms application (using Framework 3.5), what application will have is some shared data on .txt file where my application should be invoked (or receive some message) if there is any 开发者_JAVA技巧update to the .txt file. My requirement is in Windows Forms, any suggestions would be helpful.
You can use the FileSystemWatcher
class for this.
If I understand you correctly, what you want is just a process running with a file updated event handler that runs your winform app.
The FileSystemWatcher class is what you need for the file update events. http://www.dotnetforce.com/Content.aspx?t=a&n=200
I'd suggest using Named Pipes
Interprocess Communication using Named Pipes in C#
精彩评论