Basically I want to create a file if it does not exist, and then write a message to it.
if (!File.Exists(filePath + fileName))
File.Create(filePath + fileName);
StreamWriter sr = new StreamWriter(filePath + fileName,false);
How to deal with this error?
The process cannot access the file 'c: \ blahblah' because it is being used by another process.
user1108948
source
share