I have an application which creates multiple instances of the FileSystemWatcher. There is a Start Button which starts the monitoring and a Stop button which i plan to stop them
So far i am going down the path of creating an array of FSWs:
Now, this works fine, all the directories are being monitored and events firing no problem.
But, how do i close them all in a seperate button click event? I think i am missing something about working with multiple object / class instances
Cheers
Stu
So far i am going down the path of creating an array of FSWs:
Code:
Dim objWatchFolder(3) As FileSystemWatcher
For i As Integer = 0 To 2
objWatchFolder(i) = New System.IO.FileSystemWatcher
Next
The rest of the code to set the parameters for the FSW is here
Now, this works fine, all the directories are being monitored and events firing no problem.
But, how do i close them all in a seperate button click event? I think i am missing something about working with multiple object / class instances
Cheers
Stu