C# DirectoryInfo LastAccessTimeUtc

Description

DirectoryInfo LastAccessTimeUtc Gets or sets the time, in coordinated universal time (UTC), that the current file or directory was last accessed.

Syntax

DirectoryInfo.LastAccessTimeUtc has the following syntax.


[ComVisibleAttribute(false)]
public DateTime LastAccessTimeUtc { get; set; }

Example

Gets the time, in coordinated universal time (UTC), that the current file or directory was last accessed.


using System;/*from  www .  j av a 2  s.  co  m*/
using System.IO;

class Class1
{
   public static void Main(){
      DirectoryInfo  target = new DirectoryInfo("c:/abc");
      Console.WriteLine(target.LastAccessTime);
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.IO »




BinaryReader
BinaryWriter
Directory
DirectoryInfo
DriveInfo
File
FileInfo
FileStream
MemoryStream
Path
StreamReader
StreamWriter
StringReader
StringWriter