Back to Developer Roadmap

Async-await (C#)

src/data/roadmaps/server-side-game-developer/content/[email protected]

4.0536 B
Original Source

Async-await (C#)

Async/await are extensions of Promises in JavaScript that allow for handling asynchronous code in a more synchronous manner. Using async keyword before a function, means the function returns a Promise. On the other hand, await keyword is used to pause async function execution until a Promise is resolved or rejected, and to resume execution of the async function after fulfillments. Before the await keyword, the Promise resolves to the actual value. Notably, await only works within async function block.