Created
June 20, 2013 07:29
-
-
Save forcewake/5820862 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SuppressUnmanagedCodeSecurity] | |
internal static class SafeNativeMethods | |
{ | |
[DllImport("shlwapi.dll", CharSet = CharSet.Unicode)] | |
public static extern int StrCmpLogicalW(string psz1, string psz2); | |
} | |
public sealed class NaturalStringComparer : IComparer<string> | |
{ | |
public int Compare(string a, string b) | |
{ | |
return SafeNativeMethods.StrCmpLogicalW(a, b); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment