System.Threading.Lock: The Purpose-Built Lock That Replaces Your object Hack
Since .NET 9, the System.Threading.Lock type gives you a dedicated, faster, and semantically clearer alternative to locking on a bare object. Here is how it works, why it is roughly 25% faster than Monitor, and what to watch out for when migrating.
Implicit Indexer Access in Object Initialisers
C# 13 allows the implicit 'from the end' index operator (^) inside object initialisers, completing index expression support.
The \e Escape Sequence: First-Class Terminal Escape Codes in C#
C# 13 adds the \e escape sequence for the ESC character, making ANSI terminal formatting cleaner and less error-prone.
The Lock Object: A Purpose-Built Synchronisation Primitive
C# 13 introduces System.Threading.Lock, a dedicated type for the lock statement that improves performance and clarity.
Partial Properties: Completing the Partial Story
C# 13 extends partial members to include properties and indexers, enabling cleaner source generator patterns.
Params Collections: Beyond Arrays with params
C# 13 extends the params keyword to work with any collection type including spans, lists, and custom collections.