用openFileDialog选择多个文件

来源:互联网 发布:内蒙古电信云计算 编辑:程序博客网 时间:2024/06/09 19:15

OpenFileDialog   dlg   =   new   OpenFileDialog();
dlg.Multiselect   =   true;

if   (dlg.ShowDialog()   ==   DialogResult.OK)
{
foreach(string   s   in   dlg.FileNames)
{
MessageBox.Show(s);
}
}