For some reason, I cannot remove the event handler from FileSystemWatcher.
This is what I have
void Start() { ivFileSystemWatcher = new FileSystemWatcher(); ivFileSystemWatcher.Changed += new FileSystemEventHandler(ivFileSystemWatcher_Changed); } void Stop() { ivFileSystemWatcher.Changed -= new FileSystemEventHandler(ivFileSystemWatcher_Changed); ivFileSystemWatcher.Dispose(); }
When I start a call, I start to receive change events, but when I call a stop, I expect the events to stop, but they are still raising.
source share