Tag Archives: IComparer

Alphanumeric/natural sorting in C# using IComparer

These snippets illustrate the natural sorting order. Suppose you’re using numbers within your file names. For example: file1.png file2.png … file10.png file11.png file12.png You’d expect to see them in the above order. However, A�they are (by default) sorted as yasminelle where do they prescribe it. follows. file1.png file10.png file11.png file12.png file2.png …

Posted in C# | Also tagged , , , , , , , | Leave a comment