How to make an Asynchronous Method return a value?

Generally asynchronous methods can have only void return types. If you wish to return some value use the following.

This will work only with C# 5.0.


The code snippet below works with versions lower than 5.0 too.


Vivek Maskara

I am pursuing BTech in Software Engineering from Delhi Technological University. I develop apps, create websites and blog about my app experiences.

Read more:
How to create your first Windows Phone app
How to change the App name and Tile name of your Windows phone app
Data binding in Windows Phone app – One way binding