Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to sort because the IComparer.Compare() method returns inconsistent results #9

Open
glen-84 opened this issue May 27, 2020 · 0 comments

Comments

@glen-84
Copy link

glen-84 commented May 27, 2020

styles-x.zip (contains styles-x.xml).

Unhandled Exception: System.ArgumentException: Unable to sort because the IComparer.Compare() method returns inconsistent results. Either a value does not compare equal to itself, or one value repeatedly compared to another value yields different results. IComparer: 'System.Array+FunctorComparer`1[System.Xml.XmlNode]'.
   at System.Collections.Generic.IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(Object comparer)
   at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)
   at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer)
   at System.Collections.Generic.List`1.Sort(Comparison`1 comparison)
   at sortxml.Program.SortNodes(XmlNode node)
   at sortxml.Program.SortNodes(XmlNode node)
   at sortxml.Program.Main(String[] arguments)
zanaptak added a commit to zanaptak/sortxml that referenced this issue Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant