Tag: Await

Whats New in C# 5.0 Part-2

With the proposed new features, the asynchronous version of the code will instead look like this: public async Task<int> SumPageSizesAsync(IList<Uri> uris) { int total = 0; foreach (var uri in uris) { statusText.Text = string.Format("Found {0} bytes ...", total); var data = await new WebClient().DownloadDataAsync(uri); total += data.Length; } statusText.Text = string.Format("Found {0} bytes total",

Whats new in C# 5.0 Part-1

The Microsoft Visual Studio Async Community Technology Preview introducing a new language feature in C# and VB, and a new framework pattern to go with it, that will make asynchronous programming similar to synchronous programming. This blog describes the limitations of the current callback based programming model for asynchrony, and provides overview to the new
SiteLock