[英]VB.NET Initial Sort Order
To make a long story short, Mp3Tag for example, adds folders 1 to 5 first to last.长话短说,例如 Mp3Tag,首先添加文件夹 1 到 5。 When I add the same folders in my program it adds the folders from 5 (first) to 1 (last).
当我在我的程序中添加相同的文件夹时,它会添加从 5(第一个)到 1(最后一个)的文件夹。 Is there a way I can fix this?
有没有办法解决这个问题?
Here's the code I've been using.这是我一直在使用的代码。
If FolderBrowserDialogMain.ShowDialog = DialogResult.OK Then
For Each mp3 In Directory.GetFiles(FolderBrowserDialogMain.SelectedPath, "*.mp3", IO.SearchOption.AllDirectories)
Dim fiFileInfo As New FileInfo(mp3)
ListViewMain.Items.Add(fiFileInfo.Name)
Next
End If
Maybe add .Reverse to reverse the files?也许添加 .Reverse 来反转文件?
If FolderBrowserDialogMain.ShowDialog = DialogResult.OK Then
For Each mp3 In Directory.GetFiles(FolderBrowserDialogMain.SelectedPath, "*.mp3", IO.SearchOption.AllDirectories).Reverse()
Dim fiFileInfo As New FileInfo(mp3)
ListViewMain.Items.Add(fiFileInfo.Name)
Next
End If
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.