OpenFileDialog dlg = new OpenFileDialog();
dlg.Multiselect = true;
if (dlg.ShowDialog() == DialogResult.OK)
{
foreach(string s in dlg.FileNames)
{
MessageBox.Show(s);
}
}
用openFileDialog选择多个文件
最新推荐文章于 2023-11-27 10:11:34 发布
本文介绍了一个使用 C# 实现的 OpenFileDialog 示例,演示了如何通过设置 Multiselect 属性为 true 来实现多文件的选择,并展示了如何遍历所选文件并显示其路径。
470

被折叠的 条评论
为什么被折叠?



