I have a some code in C# to delete a file, and sometimes I get the following IOException while I can't find any program using this file.
The process cannot access the file because it is being used by another process
How can I solve this problem?
I did not find any solution.