FileSystemWatcher fsw = new FileSystemWatcher();
fsw.Path = @"C:\foo.txt";
fsw.Changed += new FileSystemEventHandler(LogFileChanged);
private void LogFileChanged(object s, FileSystemEventArgs e)
{
}
如果我在 LogFileChanged()
中放置断点 -> 打开并编辑 foo.txt
-> 保存文件,断点不会命中。有人可以解释我错过了什么吗?
最佳答案
关于c# - FileSystemWatcher Changed 事件不会触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13887709/