Hi, very often, when I copy a file with the following code:
System.IO.File.Copy(source, destination, true);
the copied file can not be deleted until the program exits. If you try to
delete it you get an error "The file is being used by the system".
Any idea of how to avoid this? It is a static method so I think I dont have
any objects to destroy.
If I do the copy in another thread could it solve the problem when the
thread is destroyed?
thank you!