Practicing and exploring
Test your knowledge and understanding by answering some questions, getting some hands-on practice, and exploring this chapter’s topics with deeper research.
Exercise 4.1 – Test your knowledge
Answer the following questions:
- What information can you find out about a process?
- How accurate is the
Stopwatch
class? - By convention, what suffix should be applied to a method that returns
Task
orTask<T>
? - To use the
await
keyword inside a method, what keyword must be applied to the method declaration? - How do you create a child task?
- Why should you avoid the
lock
keyword? - When should you use the
Interlocked
class? - When should you use the
Mutex
class instead of theMonitor
class? - What is the benefit of using
async
andawait
in a website or web service? - Can you cancel a task? If so, how?
Exercise 4.2 – Explore topics
Use the links on the following GitHub page...