hello,
i am having a problem while displaying files present in the selected folder (using folderbrowserdialog) in a listbox. i had tried this but i didnt get it...
so can anyone suggest me if there is any error over here..
Thank u..
FolderBrowserDialog folderBrowserDialog1 = new FolderBrowserDialog();
folderBrowserDialog1.ShowDialog();
DialogResult result = this.folderBrowserDialog1.ShowDialog();
if (result == DialogResult.OK)
{
string foldername = this.folerBrowserDialog1.SelectedPath;
foreach (string f in Directory.GetFiles(foldername))
this.listBox1.Items.Add(f);
}