DirectoryInfo di1 = new DirectoryInfo(facepath);
if(Directory.Exists(facepath))
{
foreach(FileInfo f in di1.GetFiles())
{
}
}请问返回文件的次序是如何的

解决方案 »

  1.   

    The order in which this function returns the file names is dependent on the file system type. With NTFS and CDFS file systems, the names are returned in alphabetical order. With FAT file systems, the names are returned in the order the files were written to the disk, which may or may not be in alphabetical order.这个顺序是没有办法修改的。
    和文件系统有关,NTFS和CDFS下,是按照字母顺序,而FAT下,按照文件创建时间顺序