Skip to content

Instantly share code, notes, and snippets.

@jpschw
Created February 12, 2015 07:06
Show Gist options
  • Save jpschw/c932c22b0d7177caf170 to your computer and use it in GitHub Desktop.
Save jpschw/c932c22b0d7177caf170 to your computer and use it in GitHub Desktop.
private async void LoadAccount()
{
Account account = await DownloadAccount();
MessageBox.Show("Account downloaded");
}
private async Task<Account> DownloadAccount()
{
return await Task.Run(() =>
{
// Download account here
Account account = .......
return account;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment