Creating scopes with braces
Creating scopes with braces without any statements
ConcurrentDictionary AddOrUpdate method
ConcurrentDictionary (unlike Dictionary) has a useful AddOrUpdate method
Exploring the new list pattern
Exploring the new list and slice pattern coming with C# 11
Setting readonly variable using init
Readonly variable can be set using an init only setter
Managing multi-thread access with ReaderWriterLockSlim
Using ReaderWriterLockSlim to allow concurrent reading but exclusive writing
Interlocked vs using the lock keyword
How InterLocked can simplify the lock process in certain cases
Cancel a task with OperationCanceledException
Why the OperationCanceledException should be used over a soft cancellation
Anonymous types and with keyword
Using the with keyword to support non-destructive mutations on anonymous types