I'm trying to write a string out to a file using File.AppendAllText, but I need to do it several times over the course of the program.
I'm not using threading, and to give the file time to close, I'm letting my program sleep for a couple of seconds after it finishes the first write.
However, I'm getting a "This process cannot access the file [my filepath] because it is being used by another process."
I don't have the file open in a text editor or anything, and the program only uses AppendAllText, so it should have closed any instances of the file that the program had open already, right?
Any help is appreciated!