C# 获得目录创建时间的源码片段
2021-06-06 05:01
标签:console 时间 write 创建 delete get 创建时间 tor let C# 获得目录创建时间的源码片段 标签:console 时间 write 创建 delete get 创建时间 tor let 原文地址:https://blog.51cto.com/14311845/2386968using System;
using System.IO;
class DirectoryCreationTime
{
public static void Main()
{
string directoryString =
Directory.GetCurrentDirectory() + @"TestDir";
Directory.CreateDirectory (directoryString);
DateTime dateTime = Directory.GetCreationTime (directoryString);
Console.WriteLine("Creation time: {0}", dateTime);
Directory.Delete (directoryString);
}
}
下一篇:win10激活180天