Writing part of an application that is supposed to clean up any old files, but some of these are quite large so i start some BackgroundWorkers to do the bulk of the work. My question is, if i am calling a file.Delete call on a FileInfo object on a BackgroundWorker and the application exits:
- What will happen to that file, is it going to hang around in an invalid state?
- Will the application hang, or will the BGWorker stay alive?
- Is the file left invalid?
- Is BackgroundWorker the correct class to be using in this case?