File was Created at : 9/30/2013 12:15:44 PM
Here is source code of the C# Program to Get File Time using File Class. The C# program is successfully compiled and executed with Microsoft Visual Studio. The program output is also shown below.
/*
* C# Program to Get File Time using File Class
*/
using System;
using System.IO;
class Program
{
static void Main()
{
FileInfo info = new FileInfo("C:\\srip.txt");
DateTime time = info.CreationTime;
Console.WriteLine("File was Created at : ");
Console.Write(time);
Console.Read();
}
}
Here is the output of the C# Program:
File was Created at : 9/30/2013 12:15:44 PM