<t>Lors de l'utilisation de async et await, le compilateur génère une machine à états en arrière-plan.<br/>
<br/>
Voici un exemple sur lequel j'espère pouvoir expliquer quelques détails de haut niveau sur ce qui se passe :<br/>
<br/>
public async Task MyMethodAsync()<br/>
{<br/>
Task longRunningTask = LongRunningOperationAsync();<br/>
// independent work which doesn't need the result of LongRunningOperationAsync can be done here<br/>
<br/>
//and now we call await on the task <br/>
int result = await longRunningTask;<br/>
//use the result <br/>
Console.WriteLine(result);<br/>
}<br/>
<br/>
public async Task LongRunningOperationAsync() // assume we return a</t>