Last Updated: May 22, 2026
ValueTask<T> is a struct alternative to Task<T> for async methods that frequently finish without ever going asynchronous. The win is allocation: a Task<T> is a reference type that lives on the heap, and on a hot path that mostly returns a cached value, those allocations add up. This lesson covers why ValueTask exists, how it works, the strict rules you have to follow when using it, and when it's actually worth using.