参考地址 https://stackoverflow.com/questions/15260146/file-delete-access-to-the-path-is-denied
if (File.Exists(filePath))
{
File.SetAttributes(filePath, FileAttributes.Normal);
File.Delete(filePath);
}
if (File.Exists(filePath))
{
File.SetAttributes(filePath, FileAttributes.Normal);
File.Delete(filePath);
}
本文标题:C# 文件删除时,报 is denied 错
本文链接:https://www.haomeiwen.com/subject/qiulpktx.html
网友评论