Programming C# 12 Book, by Ian Griffiths, published by O'Reilly Media, is now available to buy.
Endjin Technical Fellow and 17 times Microsoft MVP Ian Griffiths has been the author of O'Reilly Media's Programming C# book series for over a decade:
- C# 5.0 (2012)
- C# 8.0 (2019)
- C# 10 (2022)
and now the latest edition covering C# 12 has just been released to buy:
The since the C# 10.0 edition was published in 2022; the .NET runtime had made substantial performance improvements, and increased its reach, building on the "One .NET" initiative.
Programming C# 12 covers all of the additions and changes to the C# language that have been made since the C# 10.0 edition, including:
C# 11.0
- Generic math
- static virtual and abstract methods
- raw string literals
- UTF-8 string literals
- list patterns
- char span pattern matching
- required properties
- ref fields and scoped refs
- generic attribute types
C# 12.0
- primary constructors
- default argument handling for lambdas
- inline arrays
- collection expressions
- ref readonly parameters
- improved AOT code generation support
The book is written for experienced developers who want to gain a thorough understanding of C# and the underlying .NET runtime.
Code samples from the book can be found on GitHub
Ian has also published a number of in-depth articles delving into the nuances of C# 9.0 / 10 / 11 / 12 and .NET 6, 7 and 8 which you may find interesting:
- When C# 9.0 patterns go wrong: mechanism over intent
- C# 10.0 implicit global using directives
- How C# 10.0 and .NET 6.0 improve ArgumentExceptions
- How .NET 6.0 boosted Ais.Net performance by 20%
- Raising Coding Standards with .NET 6.0 Code Analyzers
- C# 10.0 improves handling of nullable references in generic types - no more AllowNull
- C# 11.0 preview: parameter null checking
- Excel, data loss, IEEE754, and precision
- C# Lambda Discards
- Lazy and once-only C# async initialization
- C# 11.0 new features: raw string literals
- C# 11.0 new features: UTF-8 string literals
- C# 11.0 new features: newlines in string interpolation
- C# 11.0 new features: list pattern matching
- C# 11.0 new features:
Span<char>
pattern matching