本文介绍了在详细信息的驱动器中显示文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨!
如何在驱动器中显示带有详细信息的文件夹? ? ? ?
hi !
how to show folders in a drive with details ? ? ? ?
推荐答案
// Make a reference to a directory.
DirectoryInfo di = new DirectoryInfo(@"c:\");
// Get a reference to each directory in that directory.
DirectoryInfo[] diArr = di.GetDirectories();
// Display the names of the directories.
foreach (DirectoryInfo dri in diArr)
{
// Do your stuff with the information of each directory
Console.WriteLine(dri.Name);
Console.WriteLine(dri.CreationTime.ToString());
// ...
// ...
}
干杯,
Edo
Cheers,
Edo
这篇关于在详细信息的驱动器中显示文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!