Skip to content
Search lessons, topics, tests…
Esc

    ↑ ↓ moveEnter openEsc close
    Lesson2 / 10

    Module 1 · Interview Blueprint and Core Questions · Lesson 2 of 10

    Interview blueprint

    Start here: Give the answer, then name the failure mode

    Use this small trace before the longer program below.

    C#
    Task<int> stock = Task.FromResult(12);
    Task<int> reviews = Task.FromException<int>(new InvalidOperationException("Offline"));
    Task<int[]> both = Task.WhenAll(stock, reviews);
    Console.WriteLine(both.IsFaulted);
    Console.WriteLine(await stock);

    Both inputs are already complete; the combined task is faulted, but the successful input still returns 12. First state the result. Then name the product decision: can this page legitimately show stock without reviews, or is the response contract all-or-nothing? The API tells you the outcome; it does not decide the business policy.

    What does this console trace print?

    A False, then 12
    B True, then 12
    C True, then 0
    D True, then an exception from awaiting stock
    Show answer

    Correct answer: B

    The combined task faults because reviews faulted. The stock task is a separate successful task and keeps its result.

    Microsoft documentation

    What this lesson gives you

    A useful rehearsal can be depth-first: choose a manageable set of questions with layered follow-ups instead of rushing through many shallow prompts. This lesson proposes a time split for a 60-minute technical round, how a single question is layered, a scoring rubric you can use from either side of the table, and how to turn the course's question bank into a plan for your own interview.

    Where the 60 minutes go

    The weighting below is a recommended structure, a synthesis rather than a published rubric, built from what senior backend .NET roles actually own: APIs, data, diagnostics, resilience, testing and cloud delivery.

    Topic areaPrioritySuggested timeWhy it mattersCourse questions
    Architecture and design patternsHigh8 minBoundaries, coupling, CQRS and DDD trade-offs, pragmatic architectureQ01-Q04, Q34
    Advanced C# language featuresHigh10 minAsync, LINQ, generics, spans and disposal show whether the platform is really understoodQ05-Q12
    ASP.NET Core and Web APIsHigh9 minMiddleware, DI, HTTP semantics, background work, outbound callsQ17-Q22
    EF Core and data accessHigh7 minChange tracking, query shape, concurrency and transactions are common production failuresQ23-Q27
    Performance and concurrencyHigh8 minSenior candidates diagnose bottlenecks instead of guessingQ14-Q16, Q28-Q33
    Distributed systems, microservices, securityMedium-high8 minModern service ecosystems and public APIsQ35-Q42
    TestingMedium4 minKeeping systems changeable and verifiableQ43-Q44
    CI/CD, cloud and DevOpsMedium3 minDelivery competence, probed efficientlyQ13, Q45-Q46
    Behavioral and leadershipHigh for senior roles3 minOwnership, communication and incident handlingQ47-Q50

    Company style shifts the weights. Product and platform teams skew toward APIs, performance and distributed systems. Enterprise application teams spend more time on ASP.NET Core, EF Core, testing and modernization. Infrastructure-heavy teams probe concurrency, diagnostics, CI/CD and hosting choices harder. Read the job description and move five to ten minutes of your preparation toward its emphasis.

    How one question is layered

    Interviewers use a short question only as an entry point. They then ask why, what changes at higher scale, and what the failure modes are. Here is one entry question and three follow-ups, as a program you can run:

    Predict the trace before running

    For the program below, write three predictions: whether WhenAll waits for pricing, how many failures its Exception stores, and whether the first caught message identifies a portable “first failure” rule. Run the complete program in a fresh console project with .NET 10; the implicit console-project usings supply its standard namespace imports.

    ObservationSupported conclusionExtra claim to avoid
    Two supplied tasks faultInspect both stored failuresLogging one exception captures every failure
    Pricing succeedsIts completed result remains availableWhenAll automatically cancels siblings
    One exception is propagated by awaitCatch that failure and inspect the aggregate when neededThe selected message proves a guaranteed completion order
    C#
    // A depth-first interview question in code: one entry prompt, three follow-ups.
    // Entry: what does awaiting Task.WhenAll give you when two of three calls fail?
    var calls = new[] { CallAsync("pricing", 30, fail: false), CallAsync("stock", 10, fail: true), CallAsync("reviews", 20, fail: true) };
    var all = Task.WhenAll(calls);
    try
    {
        await all;
    }
    catch (Exception ex)
    {
        // Follow-up 1: await propagates one stored failure; inspect the task for all failures.
        Console.WriteLine($"1. await caught: {ex.GetType().Name}: {ex.Message}");
        // Follow-up 2: the task itself keeps every failure.
        var messages = all.Exception!.InnerExceptions.Select(e => e.Message).Order();
        Console.WriteLine($"2. all.Exception holds {all.Exception.InnerExceptions.Count}: {string.Join(", ", messages)}");
    }
    // Follow-up 3: the call that succeeded still completed, so its result is available.
    Console.WriteLine($"3. pricing status: {calls[0].Status}, result: {await calls[0]}");
    
    static async Task<string> CallAsync(string name, int delayMs, bool fail)
    {
        await Task.Delay(delayMs);
        if (fail) throw new HttpRequestException($"{name} unavailable");
        return $"{name} ok";
    }

    Real output (.NET 10, Release):

    Text
    1. await caught: HttpRequestException: stock unavailable
    2. all.Exception holds 2: reviews unavailable, stock unavailable
    3. pricing status: RanToCompletion, result: pricing ok
    • Entry: "What happens when you await Task.WhenAll and two of three calls fail?" A mid-level answer: "It throws." A senior answer: "await propagates one stored failure; inspect the faulted task's Exception for the others. WhenAll waits for every supplied task and does not cancel siblings automatically."
    • Follow-up 1, why: awaiting propagates a stored exception rather than throwing the task's outer aggregate wrapper; line 1 shows stock unavailable in this example. It does not recursively unwrap an AggregateException deliberately thrown by an operation. Do not treat the selected exception as a portable guarantee about which operation failed first.
    • Follow-up 2, failure modes: if you log only the caught exception you lose the second failure. Inspect all.Exception.InnerExceptions (line 2) when every failure matters.
    • Follow-up 3, scale: the successful call completed and its result is usable (line 3). At scale you ask whether a partial result is acceptable, whether the failed calls should be retried, and how many calls you are allowed to fan out at once (Q30 and Q33).

    Practise every question in the bank this way: give the one-minute answer, then answer the three follow-ups before reading them.

    Check the reasoning

    Two of three supplied tasks fault and the third succeeds. Which observation is safe to use in a senior interview answer?

    A WhenAll cancels the successful sibling automatically.
    B WhenAll waits for all three, and its faulted task retains the supplied failures.
    C The exception propagated by await is a portable first-completion clock.
    D The successful result becomes unavailable as soon as a sibling fails.
    Show answer

    Correct answer: B

    WhenAll completes only after all supplied tasks finish. A faulted WhenAll task holds their failures; the successful task keeps its result. Inspect all.Exception when every failure matters.

    Option A: WhenAll itself does not cancel the supplied operations.

    Option C: Do not derive a portable failure-order guarantee from the propagated exception.

    Option D: A completed successful task retains its result.

    Hint: Separate the combined task’s status from each supplied task’s own outcome.

    A scoring rubric

    Use this when you rehearse with a friend, or to judge your own recorded answers:

    ScoreWhat it sounds like
    1Definition only, or a confident wrong statement
    2Correct definition, no trade-off, no example
    3Correct with one trade-off and a concrete example from real work
    4Names when it fails, what it costs and what you would measure; adapts to the interviewer's constraint

    For this practice rubric, aim for mostly 3s and 4s and revisit weak core topics such as async, DI lifetimes and EF Core tracking. This is a study target, not a published employer hiring threshold or a prediction of an offer.

    Turning the blueprint into a plan

    1. Mark the two or three rows of the table that match the job description.
    2. For those rows, answer every listed question aloud and score yourself with the rubric.
    3. For every 1 or 2, reread the explanation and the pitfalls, then retry the next day.
    4. Prepare two real stories for the behavioral questions in Lesson 6 and one whiteboard exercise from Lesson 7 end to end.
    5. Finish with the module practice tests and the timed final mock.

    A practical rule for the interview itself: when you are unsure, say what you would measure or check first. "I would look at the generated SQL before choosing between Include and a projection" is a senior answer; guessing is not.

    Practice

    Practice test: Senior .NET Interview Practice: Interview Blueprint5 questions · 1 mark each, no negative marking
    Take the test
    Sign in to mark lessons done and keep your place in the course.Sign in

    TechInterviewNotes Editorial Team · Updated 28 Oct 2026 ·