C# DirectoryInfo CreationTimeUtc

Description

DirectoryInfo CreationTimeUtc Gets or sets the creation time, in coordinated universal time (UTC), of the current file or directory.

Syntax

DirectoryInfo.CreationTimeUtc has the following syntax.


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

Example

Gets the creation time, in coordinated universal time (UTC), of the current file or directory.


// ww w.  j  ava  2 s.com
using System;
using System.IO;

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

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