📜  c# 文件目录选择 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:46.940000             🧑  作者: Mango

代码示例1
CommonOpenFileDialog dialog = new CommonOpenFileDialog();
dialog.InitialDirectory = "C:\\Users";
dialog.IsFolderPicker = true;
if (dialog.ShowDialog() == CommonFileDialogResult.Ok)
{
    MessageBox.Show("You selected: " + dialog.FileName);
}