i use this code to select a path and get all subdirectories of it
- if (FBD_devis.ShowDialog() == DialogResult.OK)
- {
- try
- {
-
- DirectoryInfo diri_info = new DirectoryInfo(FBD_devis.SelectedPath); listBox2.Items.AddRange(diri_info.GetDirectories("*", SearchOption.AllDirectories));
-
- }
- catch (UnauthorizedAccessException u)
- {
MessageBox.Show("le problème c'est a cause ce Dossiers: " + u.Message + "\n" + u.Source); -
- }
- }
but when i select the path
it generate this problem
how can I fix this problem please ?