Get File last access time in CSharp
Description
The following code shows how to get File last access time.
Example
//w w w. j a v a 2s . c o m
using System;
using System.IO;
class MainClass
{
public static void Main()
{
string s = "Main.cs";
Console.WriteLine("Filename " + s);
Console.WriteLine(" Accessed at " + File.GetLastAccessTime(s));
}
}
The code above generates the following result.