K
Ken
I set up a FileSystemWatcher to watch one specific file, code sample below.
I have set the NotifyFilter to NotifyFilters.LastWrite. When the file is
saved Class1.WeChanged is fired 2 times. Does anyone know why this would
be? I understand that a rename or a move causes multiple events to be fired
but don't know why LastWrite would get fired more than once.
FileSystemWatcher fs = new FileSystemWatcher ( );
fs.Path = ".\\";
fs.Filter = "Test.dat";
fs.NotifyFilter = NotifyFilters.LastWrite;
fs.Changed += new FileSystemEventHandler ( Class1.WeChanged );
fs.EnableRaisingEvents = true;
Thank You
Ken
I have set the NotifyFilter to NotifyFilters.LastWrite. When the file is
saved Class1.WeChanged is fired 2 times. Does anyone know why this would
be? I understand that a rename or a move causes multiple events to be fired
but don't know why LastWrite would get fired more than once.
FileSystemWatcher fs = new FileSystemWatcher ( );
fs.Path = ".\\";
fs.Filter = "Test.dat";
fs.NotifyFilter = NotifyFilters.LastWrite;
fs.Changed += new FileSystemEventHandler ( Class1.WeChanged );
fs.EnableRaisingEvents = true;
Thank You
Ken