C#使用Create创建文件后,报The Process cannot access the file because it is being used by another process的异常
2013-08-15 10:29
1376 查看
今天使用File.Create("dddd.txt");后,打开这个文件时报The Process cannot access the file because it is being used by another process的异常。在网上找到解决方法如下:
File.Create("dddd").Close();
如果不Close(),那么这个文件一直被创建进程占着,直到创建进程被关闭。
File.Create("dddd").Close();
如果不Close(),那么这个文件一直被创建进程占着,直到创建进程被关闭。
相关文章推荐
- C#使用Create创建文件后,报The Process cannot access the file because it is being used by another process的异常
- C# The process cannot access the file because it is being used by another process
- Solution: The process cannot access the file [filename] because it is being used by another process.
- 处理文件时遇到:The process cannot access the file because it is being used by another process.
- FileStream:The process cannot access the file because it is being used by another process
- the process cannot access the file because it is being used by another process
- 【转】IIS: The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
- FileStream:The process cannot access the file because it is being used by another process
- The process cannot access the file because it is being used by another process.
- the process cannot access the file because it is being used by another process
- the process cannot access the file because it is being used by another process
- the process cannot access the file because it is being used by another process
- IIS:The process cannot access the file because it is being used by another process.
- the process cannot access the file because it is being used by another process
- 【IIS】the process can not access the file because the file is being used by another process
- Bug on Build Solution: "Unable to copy file... because it is being used by another process.."
- 解决编译报错:Unable to copy file, because it is being used by another process.
- Visual studio bin/Debug/… because it is being used by another process
- File ID 1 of database ID 6 cannot be shrunk as it is either being shrunk by another process or is empty 的解决方案
- System.IO.IOException:The process cannot access the file 'XX.xml' because it is being used by another process. 解决方案