Skip to content

Instantly share code, notes, and snippets.

@pparadis
Created December 17, 2012 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pparadis/4314733 to your computer and use it in GitHub Desktop.
Save pparadis/4314733 to your computer and use it in GitHub Desktop.
async Task<int> AccessTheWebAsync()
{
HttpClient client = new HttpClient();
Task<string> getStringTask = client.GetStringAsync("http://msdn.microsoft.com");
GrosseEtLongueTache();
string urlContents = await getStringTask;
return urlContents.Length;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment