文件夹浏览时dialogresult要写全引用路径
string path=null;
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.Description = "请选择文件夹";
if (fbd.ShowDialog()==System.Windows.Forms.DialogResult.OK)
{
path = fbd.SelectedPath; }
foreach(string fileName in System.IO.Directory.GetFiles(path))
{
System.Windows.Forms.MessageBox.Show(fileName);
}