Implement multithreading and asynchronous processing
Manage multithreading
Implement program flow
Create and implement events and callbacks
Implement exception handling
- Use the Task Parallel library, including theParallel.For method, PLINQ, Tasks;create continuation tasks; spawn threads by using ThreadPool; unblock the UI; use async and await keywords; manage data by using concurrent collections
Manage multithreading
- Synchronize resources; implement locking; cancel a long-running task; implement thread-safe methods to handle race conditions
Implement program flow
- Iterate across collection and array items; program decisions by using switch statements, if/then, and operators; evaluate expressions
Create and implement events and callbacks
- Create event handlers; subscribe to and unsubscribe from events; use built-in delegate types to create events; create delegates; lambda expressions; anonymous methods
Implement exception handling
- Handle exception types, including SQL exceptions, network exceptions, communication exceptions, network timeout exceptions; use catch statements; use base class of an exception; implement try-catchfinally blocks; throw exceptions; rethrow an exception; create custom exceptions; handle inner exceptions; handle aggregate exception