Created
December 12, 2015 15:26
-
-
Save BojanKomazec/0496845e6bcf9a1461cb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
using System.Threading.Tasks; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
MainAsync().Wait(); | |
} | |
private static async Task MainAsync() | |
{ | |
var c = new C(); | |
var intValue1 = await c.Foo1Async(); | |
var intValue2 = await c.Foo2Async(); | |
} | |
} | |
public class C | |
{ | |
public Task<int> Foo1Async() | |
{ | |
return Task.FromResult(0); | |
} | |
public async Task<int> Foo2Async() | |
{ | |
return await Task.FromResult(0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment