为什么fileSystemWatcher的Changed 事件会出现2次
fileSystemWatcher1.Path = "C:\\";
private void fileSystemWatcher1_Changed(object sender, FileSystemEventArgs e)
{
//得到更新的文件名,以及路径
string name = e.Name;
string path = e.FullPath;
MessageBox.Show("文件" + name + "已更改!所在目录:" + path);
}
我更改C盘中的某个TXT文件,然后保存。
为什么会连续弹出2次的对话框?