programming-examples/c-sharp/Files/C# Program to Get File Time using File Class.cs

21 lines
410 B
C#
Raw Normal View History

2019-11-15 12:59:38 +01:00
/*
* 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();
}
}
/*
File was Created at :
9/30/2013 12:15:44 PM