Asynchronous Programming in C# 

Course & Training

Two days comprehensive course for seasoned C# and .NET developers covering asynchronous programming - from threads, tasks and async/await to advanced features like Task Schedulers and Synchronization Contexts.

In today's dynamic software landscape, mastering asynchronous programming is increasingly essential for writing faster, more modern and hardware-optimized applications. As multi-core CPUs are now standard, parallel processing is the key to unlocking performance. This comprehensive two-day course for seasoned C# and .NET developers covers a wide range of topics, from threads, tasks and async/await to advanced features like task schedulers and Synchronization Contexts. Included are plenty of hands-on exercises that enable you to master and apply the concepts of asynchronous programming. By the end of this course, you will understand how to use asynchronous techniques to optimize your applications' efficiency, scalability, and responsiveness. This course is up-to-date with .NET 9 and C# 13.

In-House Course:

We are happy to conduct tailored courses for your team - on-site, remotely or in our course rooms.

Request In-House Course

   

Content:


The course covers the following topics with a strong focus on practical application and hands-on exercises:

– Introduction, Processes and Threads:
... - Synchronous vs. Asynchronous programming
... - Processes and Thread concepts
... - Thread pool
... - Worker and I/O Threads
... - When not to use the thread pool
– Tasks:
... - Creating tasks
... - Returning data from a task
... - Using Tasks or Threads?
... - Waiting for tasks
– Error Handling in Asynchronous Programming:
... - Exceptions in threads
... - Exceptions in tasks
- Cancelling tasks:
... - Cancellation Token Source and Tokens
... - Continuations
– Async – Await:
... - Async methods
... - Async state machine
... - The await keyword
... - Returning data from async methods
... - Async all the way
... - Async lambdas
... - Optimizing async/await
... - .GetAwaiter().GetResult()
... - WaitAsync
– Task Schedulers:
- Async Error Handling:
- Synchronization contexts:
... - SynchronizationContext vs. TaskScheduler
- ConfigureAwait:
... - Capturing the context:
– Value Tasks:
... - Tasks vs ValueTasks
... - Performance optimizations


The course is up-to-date with .NET 9 and C# 13 and includes plenty of hands-on exercises for immediate application of learned concepts.


Disclaimer: The actual course content may vary from the above, depending on the trainer, implementation, duration and constellation of participants.

Whether we call it training, course, workshop or seminar, we want to pick up participants at their point and equip them with the necessary practical knowledge so that they can apply the technology directly after the training and deepen it independently.

Goal:

Upon completing this course, you will be able to correctly implement asynchronous programming concepts to enhance your applications using asynchronous and parallel programming. You will develop a deep understanding of threads, tasks, async/await, and advanced features like task schedulers. Through the many hands-on exercises, you can master and apply the concepts of asynchronous programming directly in your projects. You will understand how to use asynchronous techniques to optimize your applications' efficiency, scalability, and responsiveness.


Form:

A proven mix of theoretical concepts, live coding, and plenty of hands-on exercises. Participants work on real asynchronous programming tasks and can immediately apply the learned concepts. The trainer guides the process with expert knowledge and individual support.


Target Audience:

Experienced C# developers who want to understand how to correctly write asynchronous programming to enhance their applications using asynchronous and parallel programming. The course is designed for developers seeking to take their apps to the next level by optimizing performance through multi-core processing.


Requirements:

To get the most out of this training, participants should have at least one year of experience as a C# developer. A strong understanding of C#, including generics, lambdas, and LINQ, is crucial. Previous experience in parallel or async programming is not required.


Preparation:

Each participant receives a questionnaire to assess their experience level and installation instructions for the required development environment after registration. Based on the answers, we send individual feedback for optimal course preparation.

Request In-House Course:

In-House Kurs Anfragen

Waitinglist for public course:

Sign up for the waiting list for more public course dates. Once we have enough people on the waiting list, we will determine a date that suits everyone as much as possible and schedule a new session. If you want to participate directly with two colleagues, we can even plan a public course specifically for you.

Waiting List Request

(If you already have 3 or more participants, we will discuss your preferred date directly with you and announce the course.)

More about Asynchronous Programming in C#



Asynchronous programming in C# enables developers to create responsive and scalable applications that optimally utilize hardware resources. With modern multi-core processors, parallel processing is the key to performance optimization.




History


Asynchronous programming in C# evolved over several versions. The Task-based Asynchronous Pattern (TAP) was introduced in .NET Framework 4.0, followed by async/await in C# 5.0 (2012), which significantly simplified asynchronous programming.


Development was significantly driven by Stephen Toub and the .NET team at Microsoft. With .NET Core and the introduction of ValueTask, IAsyncEnumerable, and further performance optimizations, asynchronous programming was continuously improved.


Today, asynchronous programming is a fundamental component of modern .NET applications. From Web APIs to desktop applications to cloud services - async/await and the Task system enable developers to create high-performance and scalable applications. With .NET 9 and C# 13, further improvements and new features for asynchronous programming were introduced.