C#使用File.Create(FilePath)创建文件后,再次处理该文件报错。怎么解决?

 
报错xxxxxxxx...because it is being used by another process.

解决方法:
File.Create(FilePath).Close();
创建完后关闭文件即可。

相关文章:

  • 2022-12-23
  • 2021-12-15
  • 2021-09-29
  • 2021-12-10
  • 2021-12-18
  • 2021-12-19
  • 2022-02-14
  • 2022-03-06
猜你喜欢
  • 2021-11-06
  • 2022-12-23
  • 2022-01-29
  • 2021-09-06
  • 2021-08-27
  • 2021-11-26
  • 2022-02-07
相关资源
相似解决方案