If you have strings like:
\"file_0\"
\"file_1\"
\"file_2\"
\"file_3\"
\"file_4\"
\"file_5\"
\"file_6\"
\"file_11\"
how can you sort them so
The following code based on Joey's suggestion works for me (extension method to string[]):
public static void SortLogical(this string[] files)
{
Array.Sort(files, new Comparison(StrCmpLogicalW));
}
[DllImport("shlwapi.dll", CharSet=CharSet.Unicode, ExactSpelling=true)]
private static extern int StrCmpLogicalW(String x, String y);