C# Programming Language Articles

C# is Microsoft’s modern, statically-typed language for .NET development. This collection explores C# features, language evolution, practical patterns, and techniques for writing clear, efficient code in the C# ecosystem.

Language Evolution and Features

C# has evolved significantly since its creation, adopting features from other languages and innovating independently. Modern C# (10+) includes records for immutable types, nullable reference types for null-safety, pattern matching for elegant code flow, and async/await for asynchronous programming.

Records provide concise syntax for immutable data types with structural equality, ideal for domain models and data transfer objects.

Nullable Reference Types make null-safety explicit at compile time, preventing the infamous “billion-dollar mistake” of null reference exceptions.

Pattern Matching enables elegant code for type checking, null checking, and property matching without verbose if-else chains.

Async/Await abstracts the complexity of asynchronous programming, enabling responsive applications without callback hell.

Practical C# Development

Articles in this section cover language features, effective C# patterns, performance optimization, LINQ mastery, and integration with .NET libraries. Topics include null handling strategies, immutability patterns, error handling approaches, and leveraging type system features.

The goal is writing C# code that’s not just correct but also expressive, maintainable, and performant—code that communicates intent clearly and resists bugs through type safety and language features.

Runtime Async in .NET 11: The Runtime Learns to await

Runtime Async in .NET 11: The Runtime Learns to await

.NET 11 shipped on November 10 with Runtime Async: the same async/await source, but the runtime owns suspension and resumption instead of a compiler-generated state machine. The final part of the series shows my own benchmarks (exceptions 112 to 22 microseconds), cleaner live stack traces and how to opt in with confidence.
async/await in .NET: How await Got Cheaper Since 2012

async/await in .NET: How await Got Cheaper Since 2012

The 2012 async/await design needed only a compiler feature and a few library types, and every release since has built on it. This second part of the series walks from C# 5 through .NET Core 2.1, 6, 8, 9 and 10, and measures a five-level async chain on .NET Framework 4.8, .NET 8, .NET 10 and .NET 11.
From Thread to Task: The Foundations of .NET Concurrency

From Thread to Task: The Foundations of .NET Concurrency

Twenty-year-old .NET threading code still compiles and runs on .NET 11. This first part of a series follows the road from Thread and ThreadPool through APM, EAP and SynchronizationContext to the Task Parallel Library in .NET 4, and measures what pooling and tasks save today on .NET Framework 4.8, .NET 8, .NET 10 and .NET 11.
.NET 11 Performance Gains That Matter for AI-Adjacent Backends

.NET 11 Performance Gains That Matter for AI-Adjacent Backends

Cancellation is the steady state for inference gateways, not the edge case, and .NET 11 targets exactly that pain: runtime async collapses per-boundary exception rethrows, JIT deabstraction cuts allocations, and bounds-check elimination speeds up tokenization loops. None of it makes a slow model call faster, but it buys flatter tail latency and fewer instances for the same throughput.
What Actually Changed Inside the .NET 11 JIT Compiler

What Actually Changed Inside the .NET 11 JIT Compiler

.NET 11’s JIT ships real codegen wins: guarded devirtualization, wider escape analysis, a smaller delegate layout, and sharper bounds-check elimination. All of them are conditional on shapes the JIT can prove, not blanket speedups; here is what changed, why, and how to check whether your hot path qualifies.