//get last access time
string lastAccessTimePath = @"C:UsersYogeshkumar HadiyaDesktopDirectoryHandling";
DateTime lastAccessTime = Directory.GetLastAccessTime(lastAccessTimePath);
Console.WriteLine("Directory last accessed at " + lastAccessTime.ToString("MM/dd/yyyy hh:mm tt"));