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
static void Main()
FileInfo info = new FileInfo("C:\\srip.txt");
DateTime time = info.CreationTime;
Console.WriteLine("File was Created at : ");
Here is the output of the C# Program:
File was Created at : 9/30/2013 12:15:44 PM
Sanfoundry Global Education & Learning Series – 1000 C# Programs.