Cc returns the last access time of the directory

From , 4 Years ago, written in C#, viewed 51 times.
URL https://pastebin.vip/view/dfc6aa24
  1. using System;
  2. using System.IO;
  3.  
  4. class MainClass {
  5.     static void Main(string[] args) {
  6.         FileInfo file = new FileInfo("c:\\a.txt");
  7.  
  8.         // Display directory information.
  9.         DirectoryInfo dir = file.Directory;
  10.  
  11.         Console.WriteLine("Checking directory: " + dir.Name);
  12.         Console.WriteLine("In directory: " + dir.Name);
  13.         Console.Write("Directory exists: ");
  14.         Console.WriteLine(dir.Exists.ToString());
  15.  
  16.         if (dir.Exists) {
  17.             Console.Write("Directory last accessed: ");
  18.             Console.WriteLine(dir.LastAccessTime.ToString());
  19.         }
  20.         Console.WriteLine();
  21.     }
  22. }
  23. //csharp/7649

Reply to "Cc returns the last access time of the directory"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website