So my understanding is that whenever using a class that implements IDisposable, it\'s parent also needs to implement IDisposable interface. (FileWatcher using FileSystemWatc
When shutting down an application, run the dispose method.
According to the method requested, when you want to dispose of something when your shutting down the program.
if you are using a class via, then IDisposable is for disposing the class object, but essentially you still might want to do it when you are shutting down the program
bool myFlag = false;
private FileSystemWatcher watcher;
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
myFlag = true;
if(myFlag)
watcher.Dispose(); //Your FileSystemWatcher object
}