Below is the program which displays the date and time at which the file is created in c#.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace File_directory_demo
{
class Program
{
static void Main(string[] args)
{
System.IO.File.Create("e:\\abc.txt");
DateTime dt;
dt=System.IO.File.GetCreationTime("e:\\abc.txt");
Console.WriteLine("File creation time is: {0}",dt.ToString());
Console.ReadKey();
}
}
}
Comments
Post a Comment