using System.Windows.Forms; //文件路径选择对话框 var d = new FolderBrowserDialog(); d.SelectedPath = this.pathBox.Text; if (d.ShowDialog() == System.Windows.Forms.DialogResult.OK) // Result could be true, false, or null { var folderName = d.SelectedPath; this.pathBox.Text = folderName; }