OpenFileDialog.Multiselect : OpenFileDialog « System.Windows.Forms « C# / C Sharp by API






OpenFileDialog.Multiselect

 

using System;
using System.Windows.Forms;

public class OpenFileDialogSetFiles
{
  public static void Main() 
  {
    OpenFileDialog dlgOpen = new OpenFileDialog();
    
    dlgOpen.Title = "Select one or more files";
    dlgOpen.ShowReadOnly = true;
    dlgOpen.Multiselect = true;

    if (dlgOpen.ShowDialog() == DialogResult.OK)
    {
      foreach (string s in dlgOpen.FileNames)
        Console.WriteLine(s);
    }
  }
}

   
  








Related examples in the same category

1.new OpenFileDialog()
2.OpenFileDialog.CheckFileExists
3.OpenFileDialog.FileOk
4.OpenFileDialog.Filter
5.OpenFileDialog.FilterIndex
6.OpenFileDialog.InitialDirectory
7.OpenFileDialog.RestoreDirectory
8.OpenFileDialog.ShowDialog()
9.OpenFileDialog.ShowReadOnly
10.OpenFileDialog.Title