using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; namespace mpvnet { public class StringLogicalComparer : IComparer, IComparer { [DllImport("shlwapi.dll", CharSet = CharSet.Unicode)] public static extern int StrCmpLogical(string x, string y); int IComparer_Compare(object x, object y) => StrCmpLogical(x.ToString(), y.ToString()); int IComparer.Compare(object x, object y) => IComparer_Compare(x, y); int IComparerOfString_Compare(string x, string y) => StrCmpLogical(x, y); int IComparer.Compare(string x, string y) => IComparerOfString_Compare(x, y); } }