Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC#async/await state machineSingle-choice MCQ

In an async method, at which precise point does the compiler-generated state machine FIRST get boxed/heap-allocated, assuming everything completes synchronously up to that moment?

async Task<int> M() { int a = 1; await Task.Yield(); return a + 1; }