C# Deleting Directories

后端 未结 3 2055
走了就别回头了
走了就别回头了 2021-01-26 12:28

I\'m working with the .NET Compact Framework 3.5 and want to delete some specific folders and their subfolders. When I run the app it gives IO exception. I\'ve tried to use Dire

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-26 13:11

    Why not delete the directory recursively:

    Directory.Delete(path, true);
    

    See here.

    Also, see here as it may be similar to what you are encountering.

提交回复
热议问题