Skip to main content

What is async and await used for?

Junior C#
Quick Answer They let you write async code that looks like sync code. Mark a method async, then await any long-running operation like a DB query or HTTP call. The calling thread is freed while waiting รขโ‚ฌโ€ it can handle other requests. Without async/await, you block the thread and kill scalability.

Answer

async marks a method as asynchronous.

await pauses execution until the awaited task completes without blocking the thread.

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice