Your SlideShare is downloading. ×
  • Like
20131004 - Async await by Howard
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

20131004 - Async await by Howard


20131004_Async await - howard

20131004_Async await - howard

Published in Technology , Design
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads


Total Views
On SlideShare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Async Await Howard 2013/10/04
  • 2. Async Methods Are Easier toWrite • The Async and Await keywords inVisual Basic and the async and await keywords in C# are the heart of async programming. By using those two keywords, you can use resources in the .NET Framework or theWindows Runtime to create an asynchronous method almost as easily as you create a synchronous method. Asynchronous methods that you define by using async and await are referred to as async methods.
  • 3. Async Methods Are Easier toWrite • The following characteristics summarize what makes the previous example an async method. • The method signature includes an Async or async modifier. • The name of an async method, by convention, ends with an "Async" suffix. • The return type is one of the following types: • Task<TResult> if your method has a return statement in which the operand has typeTResult. • Task if your method has no return statement or has a return statement with no operand. • Void (a Sub inVisual Basic) if you're writing an async event handler. • The method usually includes at least one await expression, which marks a point where the method can't continue until the awaited asynchronous operation is complete.
  • 4. Async Await – WebClient sample
  • 5. What Happens in an Async Method •
  • 6. Thread
  • 7. Thread • 開啟Thread 的地方,也很難從呼叫的方法取得回傳值
  • 8. Task
  • 9. Async Await
  • 10. References • tw/library/hh191443.aspx#BKMK_WhatHappensUnderstandinganAsyncMe thod • •