Learn your way! Get started

C# 2012, Part 3 of 4: Asynchronous Programming

with expert Joe Mayo


Watch trailer


Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack

Release date 12/17/2012
Level Advanced
Runtime 0h 53m
Closed captioning Included
Transcript Included
eBooks / courseware Included
Hands-on labs Included
Sample code Included
Exams Included


Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More



Course description

In this course you’ll learn about what async is and how it’s different from traditional synchronous programming. You’ll also learn the benefits of async. Before going into the new async language features, you’ll see how the previous async models worked and have a better understanding for what the problems were. This will form a basis of appreciation for how easy the new C# async model is and what the benefits are for you. Next, you’ll see the fundamental mechanics of how an async method is defined. You’ll learn how to use the new async and await contextual keywords to perform async operations. You’ll learn about different types of return values and when you should use each. The course will also cover common techniques of managing async tasks either sequentially or in parallel. You’ll learn how to catch exceptions from async code and what type of code to write to ensure that you can catch exceptions. You’ll learn how to cancel one or more async operations in predictable ways. Further, you’ll see how progress reporting occurs and the ease in which you can integrate it with async methods.

Prerequisites

This course assumes that students understand the C# 3.0 syntax and have a basic understanding of the .NET Framework. No specific experience with Visual Studio 2012 is required.

Learning Paths

This course will help you prepare for the following certification and exam:
MCSD: Windows Store Apps
70-483: Programming in C#

This course is part of the following LearnNowOnline SuccessPaths™:
.NET Framework C# Development

Meet the expert

Joe Mayo is an author, independent consultant, and instructor specializing in Microsoft .NET and Windows 8 technology. He has several years of software development experience and has worked with .NET since July 2000. Joe has written books and contributes to magazines such as CODE Magazine. He has been an active contributor to the .NET community for years, operating the C# Station Web site, authoring the LINQ to Twitter open source project, and speaking regularly at user groups and code camps. For his community contributions, Microsoft has honored Joe with several Most Valuable Professional (MVP) Awards through the years.

Course outline



Async Programming

Async Programming (13:24)
  • Introduction (00:40)
  • Where Async Fits In (03:10)
  • Demo: Synchronous Problems (01:00)
  • Previous Async Technologies (00:57)
  • Demo: APM Async Model (05:05)
  • Demo: Event-Based Async Model (02:14)
  • Summary (00:15)
Writing Async Code (27:57)
  • Introduction (01:34)
  • Anatomy of an Async Method (01:23)
  • Demo: Async Method (14:11)
  • Async Return Values (01:55)
  • Demo: Async Return Values (02:12)
  • About Async Threads (00:47)
  • Awaiting in Sequence (00:37)
  • Demo: Awaiting in Sequence (01:17)
  • Awaiting in Parallel (01:04)
  • Demo: Awaiting in Parallel (02:37)
  • Summary (00:15)
Except, Cancel, and Progress (12:24)
  • Introduction (00:37)
  • Handling Exceptions (00:20)
  • Demo: Handling Exceptions (03:16)
  • Cancellation (00:48)
  • Demo: Cancellation (03:17)
  • Progress Reporting (00:57)
  • Demo: Progress Reporting (02:21)
  • Summary (00:45)