C# DirectoryInfo LastWriteTimeUtc

Description

DirectoryInfo LastWriteTimeUtc Gets or sets the time, in coordinated universal time (UTC), when the current file or directory was last written to.

Syntax

DirectoryInfo.LastWriteTimeUtc has the following syntax.


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

Example

Gets the time, in coordinated universal time (UTC), when the current file or directory was last written to.


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

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

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