Skip to content

Instantly share code, notes, and snippets.

@csainty
Created February 18, 2013 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csainty/4979897 to your computer and use it in GitHub Desktop.
Save csainty/4979897 to your computer and use it in GitHub Desktop.
public class AsyncCommand1 : IAsyncCommand
{
public Task ExecuteAsync()
{
int x = 2 + 2;
return Task.FromResult(true);
}
}
public class AsyncCommand2 : IAsyncCommand
{
public async Task ExecuteAsync()
{
int x = 2 + 2;
}
}
public class AsyncCommand3 : IAsyncCommand
{
public Task ExecuteAsync()
{
return Task.Run(() => { int x = 2 + 2; })
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment