Skip to content

Instantly share code, notes, and snippets.

@felipeslongo
Created February 25, 2019 21:57
Show Gist options
  • Save felipeslongo/37d1b374d424edd058e178c7bb6acf23 to your computer and use it in GitHub Desktop.
Save felipeslongo/37d1b374d424edd058e178c7bb6acf23 to your computer and use it in GitHub Desktop.
static void Main(string[] args)
{
var result = await SumAsync(1,2);
Console.WriteLine(result);
}
public static int Sum(int a, int b) => a + b;
public static Task<int> SumAsync(int a, int b) => Task.Run(() => Sum(a, b));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment