LINQ Quicksort is Unstable Except When Cascading

Posted by Mystagogue on Stack Overflow See other posts from Stack Overflow or by Mystagogue
Published on 2010-05-07T07:30:10Z Indexed on 2010/05/07 7:38 UTC
Read the original article Hit count: 322

Filed under:
|

On page 64 of "LINQ To Objects Using C# 4.0" (Tony Magennis) he states that LINQ's quicksort ordering algorithm is unstable...

...although this is simply solved by cascading the result into a ThenBy or ThenByDescending operator.

Huh? Why would cascading an unstable sortation into another sortation fix the result? In fact, I'd say that isn't possible. The original order, once passed through an unstable sort, is simply lost. What am I missing here?

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about sorting