377 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.
SynchronizationContext, ConfigureAwait, cancellation, timeouts, async streams, Channels, TPL Dataflow, PLINQ and Parallel.ForEachAsync.
SynchronizationContext Post and Send, UI and legacy ASP.NET contexts, ASP.NET Core having none, and the blocking-on-async deadlock.
Context capture, library versus application code, the already-completed caveat, ASP.NET Core relevance, CA2007 and ConfigureAwaitOptions.
CancellationTokenSource and token, ThrowIfCancellationRequested, Register, OperationCanceledException, RequestAborted in ASP.NET Core, disposal and where not to cancel.
CreateLinkedTokenSource, disposal to avoid leaks, telling which source fired, and combining request, shutdown and timeout cancellation.
CancelAfter, WaitAsync, HttpClient.Timeout, resilience handlers, ASP.NET Core request timeouts middleware, TimeProvider and layered timeout budgets.
Async iterators with yield return and await, await foreach, EnumeratorCancellation, ConfigureAwait, LINQ over async streams in .NET 10, EF Core and ASP.NET Core streaming.
Bounded and unbounded channels, full modes, single reader and writer options, completion, ReadAllAsync and backpressure in background processing.
Dataflow blocks, linking with completion propagation, MaxDegreeOfParallelism, BoundedCapacity, SendAsync versus Post, batching and when it is the right tool.
Parallel LINQ partitioning, degree of parallelism, ordering, merge options, cancellation, exceptions, and why it is for CPU-bound work only.
Parallel.ForEachAsync in .NET 6+, MaxDegreeOfParallelism defaults, cancellation and exception behaviour, collecting results, Parallel.ForAsync and alternatives.