Tag Archives: alphanumeric sort

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, ¬†they are (by default) sorted as follows. file1.png file10.png file11.png file12.png file2.png …

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