C# FileInfo CreationTimeUtc
Description
FileInfo CreationTimeUtc
Gets or sets the creation time,
in coordinated universal time (UTC), of the current file or directory.
Syntax
FileInfo.CreationTimeUtc
has the following syntax.
[ComVisibleAttribute(false)]
public DateTime CreationTimeUtc { get; set; }
Example
Gets or sets the creation time, in coordinated universal time (UTC), of the current file or directory.
//from w w w . ja v a 2 s .c o m
using System;
using System.IO;
using System.Security.AccessControl;
class FileExample
{
public static void Main()
{
string FileName = @"c:\MyTest.txt";
FileInfo fInfo = new FileInfo(FileName);
Console.WriteLine(fInfo.CreationTimeUtc);
}
}
The code above generates the following result.