I just try a simple method to delete file, File.Delete("path to file") can delete some types of file, but every time I use it to delete an image, it pop an error like "The path is denied/ file is currently in use"
I find it very strange, no process is using that image and in my project, no code makes use of that image, only 1 line File.Delete, so what is that error and how to overcome this ?
One more thing, I saw that error when programming in Vista, then I tried it on XP and the image was deleted smoothly, can anyone explain this