Hi,
I tried to delete an exiting file from the application using C#. The statement is as follows:
bool fileExists = System.IO.File.Exists(fileName);
if (fileExists == true)
{
System.IO.File.Delete(fileName);
}
But i"m getting the exception like:
The process cannot access the file because it is being used by another process.
Can anyone give the solution to access the file and delete without any exceptions.
Thanks in advance,
Murali