sort file name with csharp

Code Example - sort file name with csharp

                
                        string[] files = Directory.GetFiles(path).OrderBy(f => int.Parse(Path.GetFileNameWithoutExtension(f))).ToArray();