Ambesh Singh & Sachin Kumar
C# 13 Unleashed: Live Demos of my Top 10 Cutting-Edge Features!
#1about 3 minutes
A brief history of C# from version 1 to 12
Key features like generics, LINQ, async/await, and records were introduced in major C# versions leading up to C# 13.
#2about 1 minute
How to set up your environment for C# 13
To use C# 13 features, you must install the .NET 9 SDK and use a recent preview version of Visual Studio 2022.
#3about 3 minutes
Using the enhanced params modifier with collections
The `params` modifier in C# 13 is no longer limited to arrays and can now be used with any collection type, including `ReadOnlySpan` or custom types.
#4about 2 minutes
Using the caret operator in object initializers
The caret operator (`^`) can now be used within object initializers to set collection elements from the end, simplifying code for tasks like countdowns.
#5about 3 minutes
Simplifying terminal output with the new escape sequence
C# 13 introduces the `\e` escape sequence as a more intuitive and less error-prone way to represent the escape character for terminal and console applications.
#6about 3 minutes
Separating definitions with partial properties and indexers
Partial properties and indexers allow you to split a property's declaration from its implementation across different parts of a partial class, which is useful for source generators.
#7about 6 minutes
Guiding overload resolution with a priority attribute
The `OverloadResolutionPriority` attribute allows library authors to guide the compiler in choosing a specific method overload, resolving ambiguities without breaking changes.
#8about 3 minutes
Improving thread synchronization with the new lock type
A new `System.Threading.Lock` type provides a more efficient and clearer way to handle thread synchronization in multi-threaded applications compared to traditional locking mechanisms.
#9about 4 minutes
Optimizing method group overload resolution
The compiler now handles method groups more efficiently by eliminating non-matching method candidates earlier in the process, improving performance in complex overload scenarios.
#10about 3 minutes
Using ref and unsafe contexts in async methods
C# 13 allows the use of `ref` local variables and `unsafe` contexts within async methods and iterators, with restrictions around `await` and `yield` boundaries to ensure safety.
#11about 2 minutes
Allowing ref struct types in generic parameters
You can now use `ref struct` types as generic type parameters by using the `allow-ref-struct` constraint, enabling more efficient generic algorithms.
#12about 3 minutes
Implementing interfaces with ref struct types
`ref struct` types can now implement interfaces, combining the performance benefits of `ref struct` with the abstraction provided by interfaces, though conversion to the interface type is restricted.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
02:35 MIN
Overview of modern C# community-loved features
Modern C#: A Dive into the Community's Most Loved new Features.
01:57 MIN
Presenting live web scraping demos at a developer conference
Tech with Tim at WeAreDevelopers World Congress 2024
02:13 MIN
Introduction to five key features in C# 10
5 features that help you get the most out of C# 10
02:52 MIN
How to stay current with C# development
Modern C#: A Dive into the Community's Most Loved new Features.
07:11 MIN
New features for community engagement and skill building
The future of Stack Overflow as the most vital source for technologists
00:57 MIN
Approaching the live pair programming challenge
Coffee with Developers - Jonathan Tang
04:13 MIN
Q&A: SynchronizationContext, tooling, and challenges
Asynchronicity and multithreading in C#
01:51 MIN
A developer's journey through programming languages
Coffee with Developers - Martyn Kilbryde
Featured Partners
Related Videos
Exploring the Latest Features of .NET and C# by Building a Game
Rainer Stropek
Hacking C# from the inside - how to do anything in NET
Adam Furmanek
Modern C#: A Dive into the Community's Most Loved new Features.
Louëlla Creemers
5 features that help you get the most out of C# 10
Louëlla Creemers
Tips, tricks and quirks in .NET
Paweł Łukaszuk
Best of Java 15 and beyond—my favorite features
Michael Inden
Building a Compiler with C#
Florian Rappl
Turbocharged: Writing High-Performance C# and .NET Code
Steve Gordon
Related Articles
View all articles
.webp?w=240&auto=compress,format)


From learning to earning
Jobs that call for the skills explored in this talk.





generic.de software technologies AG
Karlsruhe, Germany
Intermediate
Senior
.NET
Docker
Angular




SYSKRON GmbH
Regensburg, Germany
Intermediate
Senior
.NET
Python
Kubernetes