Same question as how-can-i-get-files-from-the-hard-disk-as-array-in.html
(I posted the method used by Explorer, which sorts 0,1, 2, ...
karenpayneoregon posted another method that I did not test, but which seems to work too...
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I tried this two options :
var images = System.IO.Directory.GetFiles(radarFolderImagesDownload,
"*.gif", SearchOption.AllDirectories).OrderBy(x => x).ToArray();
var sorted = Directory.GetFiles(radarFolderImagesDownload).OrderBy(f => f);
but the result in both cases is the same the files are not sorted as they are ordered on the hard disk :
The files have numbers and in images for example the order is 0,1,10....then 19,2,20,21...
And the order they are on the hard disk :
The problem is later if I want to play with timer the images on a pictureBox they will not be played in the same order as on the hard disk.
Same question as how-can-i-get-files-from-the-hard-disk-as-array-in.html
(I posted the method used by Explorer, which sorts 0,1, 2, ...
karenpayneoregon posted another method that I did not test, but which seems to work too...