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;
 
    }

}

Popular posts from this blog

How to protect your Drive/Flash USB Drive (Pen Drive) with Password without using any software