Wednesday 18 December 2013

Cannot delete file its being used by another process



delete file error the process cannot access the file because it is being used by another process.the process cannot access the file because it is being used c#.

Solution

Type following code before your code
GC.Collect();
GC.WaitForPendingFinalizers();

No comments:

Post a Comment