Like ordering food — the waiter gives you a ticket (Task) immediately; you get the food (T) when you call "await".
Every async method must return Task, Task<T>, or ValueTask<T>. The Task represents the in-progress operation — the caller awaits it to get T.
> GetWeatherAsync("London") → Task<WeatherData>
> Task.Status: WaitingForActivation
> Caller can do other work while waitingLike ordering food — the waiter gives you a ticket (Task) immediately; you get the food (T) when you call "await".
Every async method must return Task, Task<T>, or ValueTask<T>. The Task represents the in-progress operation — the caller awaits it to get T.
> GetWeatherAsync("London") → Task<WeatherData>
> Task.Status: WaitingForActivation
> Caller can do other work while waitingSign in to cast your vote
Sign in to share your feedback and join the discussion.