Search results

  1. S

    the process cannot access the file because it is being used by another process C#

    Your problem is this: if (File.Exists(file)) { } else { File.Create(file); } change it to this if (File.Exists(file)) { } else { File.Create(file).Close(); }
Back
Top