C# Collections, Interfaces & Async/Await
Lesson Overview: Use List<T>, Dictionary<K,V>, interfaces & Task-based async/await cleanly.
Non-Blocking .NET Async
Prefix async methods with Task / Task<T> and await I/O calls so threads stay free to serve other requests.
- Dictionary<string, int> provides fast O(1) lookup
- Use string.IsNullOrWhiteSpace(s) for input checks
Test Yourself With Exercises
Await an asynchronous Task in C#:
var data =
FetchTitleAsync();