Mar 21, 2014

How to implement Folder Browser Dialogbox (FolderBrowserDialog) in c#

C# Code:

string folder=””;
using (FolderBrowserDialog dialog = new FolderBrowserDialog())
{
    dialog.Description = "Open a folder which contains your files”;
    dialog.ShowNewFolderButton = false;
    dialog.RootFolder = Environment.SpecialFolder.MyComputer;
    if (dialog.ShowDialog() == DialogResult.OK)
    {
        folder = dialog.SelectedPath;
 
    }

}