Xamarin Public Jenkins (auto-signing) e79aa3c0ed Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
2016-08-03 10:59:49 +00:00

26 lines
740 B
C#

namespace System {
using System;
using System.Collections;
using System.Globalization;
[Serializable]
internal class InvariantComparer : IComparer {
private CompareInfo m_compareInfo;
internal static readonly InvariantComparer Default = new InvariantComparer();
internal InvariantComparer() {
m_compareInfo = CultureInfo.InvariantCulture.CompareInfo;
}
public int Compare(Object a, Object b) {
String sa = a as String;
String sb = b as String;
if (sa != null && sb != null)
return m_compareInfo.Compare(sa, sb);
else
return Comparer.Default.Compare(a,b);
}
}
}