Я фильтрую файлы по нескольким расширениям и хочу упорядочить по дате.
Я пытаюсь GetFiles (). OrderByDescending (Function (p) p.LastWriteTime)
но не могу заказать вот так.
Dim driver As DriveInfo = DriveInfo.GetDrives().Where(Function(x) x.DriveType = DriveType.Removable).FirstOrDefault
If driver IsNot Nothing AndAlso driver.IsReady Then
UsbRootPath = Path.GetPathRoot(driver.RootDirectory.ToString)
Dim ext = {".png", ".jpg", "*.zip"}
Dim rootFiles() As String = ext.SelectMany(Function(f) Directory.GetFiles(driver.RootDirectory.ToString, f, SearchOption.TopDirectoryOnly)).ToArray()
End If