How to

choose folder using FolderBrowserDialog

Published: 21. January 2009 | Updated: 21. January 2009
License: Microsoft Public License (MS-PL)
Categories: File system » Directories, Winforms
Tags: C# Windows Winforms
Was this snippet helpful for you? YESYES / NONO
Get Analyzant!

Check your entire website from code to content in minutes with Analyzant, the free analysis suite.

Free download at

Import namespaces

using System.Windows.Forms;


FolderBrowserDialog dialog = new FolderBrowserDialog();

if (dialog.ShowDialog() == DialogResult.OK)
    string path = dialog.SelectedPath;
Send us feedback about this snippet »

Related Snippets: