03/20/2011
Asynchronous lambda expressions
Not only methods but also lambda expressions can be async. Among other things this allows event handlers to be anonymous: sumButton.Click += async (sender, e) => { sumButton.IsEnabled = false; await SumPageSizesAsync(GetUrls()); sumButton.IsEnabled = true; }; AddHandler sumButton.Click, Async Function(sender, e) sumButton.IsEnabled = False Await SumPageSizesAsync(GetUrls()) sumButton.IsEnabled = True End Function Another useful application of