new OpenFileDialog() : OpenFileDialog « System.Windows.Forms « C# / C Sharp by API






new OpenFileDialog()

 


using System;
using System.Windows.Forms;
using System.IO;

class MainClass
{

  public static void Main() 
  {
    OpenFileDialog dlgOpen = new OpenFileDialog();
    if (dlgOpen.ShowDialog() == DialogResult.OK)
    {
      string s = dlgOpen.FileName;
      Console.WriteLine("Filename " + s);
      Console.WriteLine(" Created at " + File.GetCreationTime(s));
      Console.WriteLine(" Accessed at " + File.GetLastAccessTime(s));
    }

  }

}

   
  








Related examples in the same category

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