using System;
using System.Windows.Forms;
using System.IO;
publicclass Example15_5
{
[STAThread]
publicstaticvoid Main()
{
// create and show an open file dialog
OpenFileDialog dlgOpen = new OpenFileDialog();
if (dlgOpen.ShowDialog() == DialogResult.OK)
{
// use the File class to return info about the file
FileInfo fi = new FileInfo(dlgOpen.FileName);
Console.WriteLine("Filename " + fi.FullName );
Console.WriteLine(" Created at " + fi.CreationTime );
Console.WriteLine(" Accessed at " + fi.LastAccessTime );
}
}
}