Search⌘ K
AI Features

Quiz

Test your understanding of asynchronous programming in C# by working through practical quiz questions. This lesson helps you evaluate key async concepts and task handling to strengthen your concurrency skills.

Question # 1

Consider the snippet below:

C#
async Task Wait()
{
await Task.Delay(1000);
}
async Task Wrapper()
{
await Wait();
await Wait();
}
public void runTest()
{
Wrapper();
}
Technical Quiz
1.

What is the outcome of running the runTest() in the snippet above?

A.

The method waits for one second before executing

B.

The method waits for two seconds before executing

C.

The method doesn’t doesn’t block and exits because the Wrapper() method is async


1 / 1
C#
using System;
using System.Threading;
using System.Threading.Tasks;
class Demonstration
{
static async Task Wait()
{
await Task.Delay(1000);
}
static async Task Wrapper()
{
await Wait();
await Wait();
}
static public void runTest()
{
Wrapper();
}
static void Main()
{
runTest();
}
}
...