.NET 10 finally fixes what Windows 10 broke π
Numeric string comparison is here!
No more Windows 10 showing up before Windows 8.
Weβve all seen it:
Windows 10Windows 11Windows 8
Sorted alphabetically, not logically π€¦.
.NET 10 to the rescue:
"8" < "10" < "11"β as nature intended- No more writing your own comparer
Episode 10showing up beforeEpisode 2Level 100sneaking in aboveLevel 9Iron Man 3outrankingIron Man 2(blasphemy)
Itβs a small update. But it ends a decade of developer side-eyes.
Just use the new compare option:
StringComparer.Create(CultureInfo.CurrentCulture, CompareOptions.NumericOrdering);
Which string-sorting bug made you cry the loudest?
