I want to sort it be the number of the names of each file. The array content is:
0Infrared.jpg
10Infrared.jpg
12Infrared.jpg
14Infrared.jpg
16Infrared.jpg
2Infrared.jpg
4Infrared.jpg
6Infrared.jpg
8Infrared.jpg
But i want it to be ordered like it is on the hard disk:
0Infrared.jpg
2Infrared.jpg
4Infrared.jpg
6Infrared.jpg
8Infrared.jpg
10Infrared.jpg
12Infrared.jpg
14Infrared.jpg
16Infrared.jpg
string[] list = Directory.GetFiles(countriesMainPath + "\\" + currentDownloadCountry,
"*infrared*.jpg");
Array.Sort(list, (x, y) => String.Compare(x.Name, y.Name));
The variables x and y does not have the properties Name