What Is Async Feature?

A quick introduction is provided on the Async feature introduced in C# 5. Async feature is designed to help asynchronous programming to make applications more responsive in activities that are potentially slow or delayed.

What Is Async Feature? Async feature is a new feature introduced in C# 5. Async feature is designed to help asynchronous programming to make applications more responsive in activities that are potentially slow or delayed. Without asynchronous programming consideration, such applications

For example, if you have GUI application with thread to accesses the web, you can make the web request asynchronously and put the thread in suspended mode while waiting for the response from the web. This frees up CPU resources for other threads to respond to user's UI activities with better response time.

According to C# 5 specification, Async Feature uses two keywords:

Below is a diagram provided by Microsoft showing the execution flow of an async function with an await expression:

Async-Await Execution Flow
Async-Await Execution Flow

Last update: 2015.

Table of Contents

 About This Book

 Introduction of C# (C Sharp)

 Data Type and Variables

 Logical Expressions and Conditional Statements

 Arrays and Loop Statements

 Data Type Features

 Floating-Point Data Types

 Passing Parameters to Methods

 Execution Environment Class

 Visual C# 2010 Express Edition

 Class Features

 C# Compiler and Intermediate Language

 Compiling C# Source Code Files

 MSBuild - Microsoft Build Engine

 Memory Usages of Processes

 Multithreading in C#

Async Feature from C# 5

What Is Async Feature?

 GetStringAsync() Method in HttpClient Class

 GetStringAsync() Method Example Program

 Watching Asynchronous Operation Execution Status

 "await" Expression and Child Thread

 "await" Expression Thread Example

 "async" Function Example

 System.IO.FileInfo Class

 System.Diagnostics.FileVersionInfo Class

 WPF - Windows Presentation Foundation

 Partial Classes and Partial Methods

 Outdated Tutorials

 References

 PDF Printing Version