Since the path is
empty/null
on
page load, it will result in argument
exception
, (
based on info from screenshot)
FolderBrowserDialog obd = new FolderBrowserDialog();
if (obd.ShowDialog() == DialogResult.OK)
{
string path = obd.SelectedPath;
DirectoryInfo directoryInfo = new DirectoryInfo(path);
}