现在的只能一次添加一个附件。 /*添加附件*/
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            openFileDialog1.Filter = "所有文件(*.*)|*.*";
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                string[] files = openFileDialog1.FileNames;
                foreach (string file in files)
                {
                    paths.Add(file);
                    t_files.Text += Path.GetFileName(file) + "  ";
                }
            }
        }

解决方案 »

  1.   

    把 openFileDialog1 的Multiselect属性设置为true 就能选择多个。
      

  2.   

    Multiselect属性设置为true 
    OpenFileDialog openFileDialog1= new OpenFileDialog();  
    openFileDialog1.Multiselect = true;  
    if (openFileDialog1.ShowDialog() == DialogResult.OK)  
      {  
      string[] filesName = openFileDialog1.FileNames;   
      foreach (string info in filesName)   
      {   
      File f=new FileInfo(info);   
      }   
      }