Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C Sharp Programming/Keywords/async

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Keywords async __TOC__ The async and await contextual keywords are used in asynchronous programming. Asynchronous programming allows a process to wait until a method completes and returns a value (or times out or otherwise fails). The keyword async must be used to modify a method or lambda expression that contains an await expression or method. These two keywords make asynchronous programming easy to implement. Simply preface any potentially long-running call with the await keyword, e.g., var text = await getLargeDataSet(); and add the async modifier to the containing method (or lambda expression). The async and await keywords are available in JavaScript and other languages and were introduced in C# version 5.0.