79073731

Date: 2024-10-10 09:44:50
Score: 1.5
Natty:
Report link

Is it producing any exceptions or is it running completely?

make sure the file is deleted after delete line using:

Debug.Assert(!File.Exists(filePath), "File was not deleted successfully.");

Also check if the file is in read only mode, you can change that using like this:

var fileInfo = new FileInfo(filePath);
if (fileInfo.Exists && fileInfo.IsReadOnly)
{
    fileInfo.IsReadOnly = false;
}
Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is it
  • Low reputation (1):
Posted by: Ghaith Mansour