Skip to main content
edited body
Source Link
Mayank
  • 8.9k
  • 4
  • 37
  • 63

How does Asynchronous tasks (Async/Await) work in .Net 4.5?

Some sample code:

private Asyncasync Task<bool> TestFunction()
{
  var x = await DoesSomethingExists();
  var y = await DoesSomethingElseExists();
  return y;
}

Does the second await statement get executed right away or after the first await returns?

How does Asynchronous tasks (Async/Await) work in .Net 4.5?

Some sample code:

private Async Task<bool> TestFunction()
{
  var x = await DoesSomethingExists();
  var y = await DoesSomethingElseExists();
  return y;
}

Does the second await statement get executed right away or after the first await returns?

How does Asynchronous tasks (Async/Await) work in .Net 4.5?

Some sample code:

private async Task<bool> TestFunction()
{
  var x = await DoesSomethingExists();
  var y = await DoesSomethingElseExists();
  return y;
}

Does the second await statement get executed right away or after the first await returns?

Post Reopened by Stephen Cleary, Adam Sills, Jason Sturges, Peter O., tenorsax
Post Closed as "not a real question" by Peter Ritchie, skolima, Jon B, occulus, hochl
added 6 characters in body; edited title; edited tags
Source Link
Mat
  • 206.5k
  • 41
  • 399
  • 415

Breif Brief explanation of Async/Await in .Net 4.5

How does Asynchronous tasks (Async/Await) work in .Net 4.5?

//some smaple Some sample code:

private Async Task<bool> TestFunction()
{
  var x = await DoesSomethingExists();
  var y = await DoesSomethingElseExists();
  return y;
}

doesDoes the second await statement get executed right away or after the first await returns?

Breif explanation of Async/Await in .Net 4.5

How does Asynchronous tasks (Async/Await) work in .Net 4.5

//some smaple code

private Async Task<bool> TestFunction()
{
var x = await DoesSomethingExists();
var y = await DoesSomethingElseExists();
return y;
}

does the second await statement get executed right away or after the first await returns?

Brief explanation of Async/Await in .Net 4.5

How does Asynchronous tasks (Async/Await) work in .Net 4.5?

Some sample code:

private Async Task<bool> TestFunction()
{
  var x = await DoesSomethingExists();
  var y = await DoesSomethingElseExists();
  return y;
}

Does the second await statement get executed right away or after the first await returns?

Source Link
Mayank
  • 8.9k
  • 4
  • 37
  • 63

Breif explanation of Async/Await in .Net 4.5

How does Asynchronous tasks (Async/Await) work in .Net 4.5

//some smaple code

private Async Task<bool> TestFunction()
{
var x = await DoesSomethingExists();
var y = await DoesSomethingElseExists();
return y;
}

does the second await statement get executed right away or after the first await returns?