If you need to select a directory in an “open file” dialog, you can use the following code :
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.ShowDialog();
string selected = dialog.SelectedPath;
The window will look like this :

If you need to select a directory in an “open file” dialog, you can use the following code :
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.ShowDialog();
string selected = dialog.SelectedPath;
The window will look like this :
