Skip to content

Instantly share code, notes, and snippets.

@einaros
Created October 29, 2010 11:23
Show Gist options
  • Save einaros/653358 to your computer and use it in GitHub Desktop.
Save einaros/653358 to your computer and use it in GitHub Desktop.
class Program
{
static void Main(string[] args)
{
Console.Out.WriteLine("Baking cookies");
BakeCookies();
Console.Out.WriteLine("Cookies baked");
Console.ReadLine();
}
private static async void BakeCookies()
{
await TaskEx.Run(() =>
{
Thread.Sleep(1000);
Console.Out.WriteLine("Done baking");
});
}
}
Output:
Baking cookies
Cookies baked
Done baking
@einaros
Copy link
Author

einaros commented Oct 29, 2010

That's entirely possible, but I haven't seen any comments on it in the specs or whitepapers.

That said, I'd much rather have clear naming, than yet more warning and information markers within VS :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment