Keeping Up with C#
From C# 5 to C# 14: A Thematic Journey Through Language Evolution
C# is a different language than it was a decade ago. This is a thematic tour of the ninety-two features that changed it — what changed, why it changed, and how the pieces compose into patterns you can actually reach for in production code.
Is this book for you?
If you nod along to at least one of these, you’re the target reader:
- You’ve been writing C# for five or more years and feel like the language moved on without you.
- You’ve used records but aren’t sure when to pick
record classvs.record struct. - You’ve heard “source generators are a thing now” but have never opened one.
- You’ve read about
Span<T>but haven’t written allocation-free code yourself. - You’re comfortable with async/await but would hesitate to explain the state machine.
- You want to make a considered case to your team about adopting nullable reference types.
Every chapter assumes you can read C# 5 fluently. It does not assume you’ve used anything past C# 7. What this book is not: a beginner’s guide to C#.
Why this book exists
There are three kinds of C# developer today.
The career shipper
Learned C# 5 or 6, built a career, has been shipping for years. For them this is a gap-filler: the features they missed, the idioms that became standard while they were heads-down on product work.
The polyglot
New to C# but arriving from Java, Go, TypeScript or Rust. They have the core syntax but not the judgement about which features are idiomatic and which are legacy.
The team lead
Deciding what to adopt in a legacy codebase. Appendix A is their starting point: LangVersion vs. TargetFramework, nullable rollout, .editorconfig enforcement, and a four-tier adoption priority matrix.
Table of contents
Eleven chapters — a foundation chapter plus ten themes. Three of them are deep dives.
Front matter
- Preface
- Introduction
- About the Author
Appendices & back matter
- A — Migration & Adoption Guide
- B — Feature Index
- C — Exercise Solutions
- Index
Chapters
- The Foundation (C# 1–4)
- Expressiveness & Boilerplate Reduction — Theme 1
- Data Modeling & Functional Techniques — Theme 2
- Evolution of Control Flow — Theme 3
- Type System & OOP Flexibility — Theme 4
- Safety & Robustness — Theme 5
- Memory & Allocation Control — deep dive
- Low-Level & Interop Primitives — Theme 7
- Asynchronous Programming Evolution — deep dive
- Compiler & Tooling Integration — Theme 9
- Modern C# in Practice — capstone
Companion code
Five sample applications — QuantLite, DevScripts, ChatStream, TypeForge and PerfBench — plus an eleven-project exercises solution. Sixteen projects in total, verified to build from a clean clone.
// C# 14: the field keyword — no backing field by hand.
public class Order
{
public decimal Total
{
get;
set => field = value < 0
? throw new ArgumentOutOfRangeException(nameof(value))
: value;
}
}
Frequently asked
Yes. It is published on Leanpub at a minimum price of zero. Leanpub lets you pay what you want if you would like to, but you can set the price to zero and download it immediately.
No. There is no email gate on this site. The download happens on Leanpub, and Leanpub asks for an account so it can deliver the file and send you updated versions.
No. It assumes you can read C# 5 fluently. If you have never written C#, start with the free Microsoft Learn tutorials and come back afterwards.
Treat the early chapters as optional review and go straight to the deep dives: Memory and Allocation Control, Asynchronous Programming Evolution, and the Modern C# in Practice capstone.
The companion projects target net10.0 with LangVersion 14, nullable reference types and implicit usings enabled. There are 16 projects across five sample applications plus an exercises solution.
Ninety-two features. Ten themes. No charge.
Download the PDF and keep every future revision.
Read it free on Leanpub