sort function on file names in C# code example
Example: sort file name with C#
string[] files = Directory.GetFiles(path).OrderBy(f => int.Parse(Path.GetFileNameWithoutExtension(f))).ToArray();
string[] files = Directory.GetFiles(path).OrderBy(f => int.Parse(Path.GetFileNameWithoutExtension(f))).ToArray();