NotifyFilters.LastWrite - throws 2 events ?!

  • Thread starter Thread starter Iddo
  • Start date Start date
I

Iddo

Hi
I'm using the FileSystemWatcher for notification when a file was Last write.
When using the Filter : NotifyFilter.LastWrite I get 2 events.
My code looks like this:

Private FileSystemWatcher watcher;
watcher = new FileSystemWatcher();
watcher.Path = "c:\Temp";
watcher.Filter = "test.txt";
watcher.NotifyFilter = NotifyFilters.LastWrite;
watcher.changed += new System.IO.FileSystemHandler(FileChanged);
watcher.EnableRaisingEvents = true;

Please let me know how to reduce the thrown events to 1...

Thanks ahead

IL
 
Are you sure you're not subscribing to the event more than once in the
code somewhere?
 
Back
Top