in reply to Spoiled by Perl

If it was a stable sort, you could use

someList.Sort( (a, b) => a.Bar.CompareTo(b.Bar) ); someList.Sort( (a, b) => a.Foo.CompareTo(b.Foo) );

But it's not. Another nice thing about Perl. (use sort qw( stable );, which is currently the default.) JavaScript also has a stable sort (at least since version 10 or EcmaScript 2019).

That said, I like C#. It's quite good at doing what Perl does well.