I am new to programming and I have a question. If I have two functions, one creates a text file and writes into it, while the other opens the same text file and reads from i
In one of the unit tests, I had to create a temp file and then remove it after, and I was getting the above error.
None of the answers worked. Solution that worked was:
var path = $"temp.{extension}"; using (File.Create(path)) { } File.Delete(path);