Created
February 18, 2013 19:25
-
-
Save csainty/4979897 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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