This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
What is the purpose of using the async and await keywords in C# for file I/O operations?
async
await
To create asynchronous methods that can perform file I/O operations without blocking the main thread.
To perform file I/O operations synchronously.
To block the main thread until the file I/O operation is complete.
What is the purpose of the HttpClient class in C#?
HttpClient
To make nonblocking calls to web resources asynchronously.
To create multiple instances for each request to web resources.
To block the UI thread while making calls to web resources.
What is the purpose of the Task Parallel Library (TPL) in C#?
To provide a set of public types and APIs for managing database connections.
To provide a set of public types and APIs in the System.Threading and System.Threading.Tasks namespaces that simplify the process of adding parallelism and concurrency to applications.
System.Threading
System.Threading.Tasks
To provide a set of public types and APIs for handling user interface events.
What is a common pitfall in data and task parallelism?
Avoiding writing to shared memory locations.
Assuming parallel is always faster.
Assuming parallel is always slower.
What is the purpose of using Parallel.ForEachAsync and Task.WhenAll in a C# application?
Parallel.ForEachAsync
Task.WhenAll
To connect the application to a database.
To implement data parallelism.
To create a user interface for the application.
You must answer all questions before checking your work.
Was this page helpful?