C# DirectoryInfo CreationTime

Description

DirectoryInfo CreationTime Gets or sets the creation time of the current file or directory.

Syntax

DirectoryInfo.CreationTime has the following syntax.


public DateTime CreationTime { get; set; }

Example

Gets or sets the creation time of the current file or directory.


/*from  w w  w.ja va 2 s  . co  m*/

using System;
using System.IO;

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

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