为了账号安全,请及时绑定邮箱和手机立即绑定

在C#上对数组中的文件目录排序

在C#上对数组中的文件目录排序

C#
翻过高山走不出你 2021-03-29 17:19:08
我不想对文件目录进行排序。我有很多文件说明。喜欢: "C:\Users\user\Desktop\programlama\destin\ankara\c11.txt""C:\Users\user\Desktop\programlama\destin\ankara\a12.txt""C:\Users\user\Desktop\programlama\destin\ankara\b11.txt"但是它必须按文件名排序。我怎样才能做到这一点?Result i want:a12 at top b11 in the middle c11 at last.这里的代码示例。FolderBrowserDialog fbd = new FolderBrowserDialog();fbd.ShowDialog();kaynak = fbd.SelectedPath; dnm = Directory.GetFiles(kaynak,ftyp, SearchOption.AllDirectories)                .Select(Path.GetFileName)                .ToArray();dsd = Directory.GetFiles(kaynak, ftyp, SearchOption.AllDirectories);
查看完整描述

3 回答

  • 3 回答
  • 0 关注
  • 198 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信