File.Delete Access to the path is denied

前端 未结 5 978
无人共我
无人共我 2021-01-18 05:26

My console application program is creating some runtime files while it is working so what I want to do is delete all of these files on the application startup. I have tried

5条回答
  •  情书的邮戳
    2021-01-18 06:16

    I got this error and found that it was because my test files were readonly. Changed this and I can now use fileinfo to delete them no worries.

提交回复
热议问题