Skip to content

Instantly share code, notes, and snippets.

@deanhume
Created August 20, 2012 12:41
Show Gist options
  • Save deanhume/3403734 to your computer and use it in GitHub Desktop.
Save deanhume/3403734 to your computer and use it in GitHub Desktop.
C# Async
private async Task GetTwitterResults()
{
WebClient wc = new WebClient();
var result;
using (WebClient client = new WebClient())
{
result = await client.DownloadStringTaskAsync("http://search.twitter.com/search.json?q=bookatable%20:)&show-user=true");
}
// Do something with the result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment