System volume information-access denied C#
Issue
I'm trying to make a program to list all the subdirectories of a root directory. I've used C:
The access to the folder "System Volume Information 'is denied.
How to ignore this exception?
Solution
try
{
//code allowing file browsing
}
catch(UnauthorizedAccessException)
{
//ignore exception
}
See also
Knowledge communities.