本文实例讲述了C#获取目录最后访问时间的方法。分享给大家供大家参考。具体如下: using System; using System.IO; class MainClass { static void Main(string[] args) { FileInfo file = new FileInfo(c:\\a.txt); // Display directory information. DirectoryInfo dir = file.Directory; Console.WriteLine(Checking directory: + dir.Name);