Replicating Windows Explorer Sort Order in C# with StrCmpLogicalW and IComparer
The default string sort orders "item10" before "item2". This shows how to reproduce Explorer's natural sort order via StrCmpLogicalW P/Invoke in an IComparer.
Articles on the C# language and the .NET libraries behind it — language features across versions, backporting newer LINQ operators to .NET Framework, and the compatibility details that matter when a codebase spans multiple target frameworks.
The default string sort orders "item10" before "item2". This shows how to reproduce Explorer's natural sort order via StrCmpLogicalW P/Invoke in an IComparer.
Implementing CountBy, AggregateBy and Index with direct dictionary accumulation, avoiding the intermediate-grouping allocations of GroupBy.
Implementing LeftJoin, RightJoin and Shuffle on .NET Framework, mapping them to SQL outer joins and covering the IQueryable translation pitfall.
Recreating the .NET 8 selector-free ToDictionary overloads on .NET Framework as an exercise in overload resolution and notnull constraint design.
A delegation-only polyfill for Order and OrderDescending, focused on ThenBy compatibility via IOrderedEnumerable and runtime-specific sort exceptions.
Measuring the runtime cost of GroupBy and full-sort workaround idioms, then replacing them with Chunk, MaxBy, MinBy and DistinctBy polyfills.
Three design principles for hand-rolled LINQ polyfills, demonstrated through the Append, Prepend, TakeLast and SkipLast implementations.
A version-by-version guide to C# operators and initialization syntax, with guidance for .NET Framework compatibility and language-version constraints.
A C# 14 extension block can target a static class such as Directory, but only static members can be added. Instance members are rejected with CS0721 or CS930...