Private void GetDirectories(DirectoryInfo subDirs,įoreach (DirectoryInfo subDir in subDirs) GetDirectories(info.GetDirectories(), rootNode) Would be so grateful if someone could explain the solution and show how to implement it. I've searched everywhere, and even found a solution suggesting to wrap my code in a Try catch block, but I don't understand how to do this. "An unhandled exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dllĪdditional information: Access to the path 'D:\System Volume Information' is denied." The code below works great when listing directories and files on a CDROM Drive, but when I change the path to:ĭirectoryInfo info = new get this exception: ![]() I'm trying to build an TreeView Explorer app that will list directories and files anywhere on my computer. ![]() ![]() I'm new to programming, and trying to learn C#, so please be very explicit when replying.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |