Skip to content

Instantly share code, notes, and snippets.

@huanlin
Last active April 23, 2016 10:52
Show Gist options
  • Save huanlin/23d3d1e3a47374b1081152d0c3e7d55a to your computer and use it in GitHub Desktop.
Save huanlin/23d3d1e3a47374b1081152d0c3e7d55a to your computer and use it in GitHub Desktop.
ScriptCS Examples
public class DemoAsyncCall
{
public async Task ShowWebContent(string url)
{
var client = new HttpClient();
var response = await client.GetAsync(url);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}
var a = new DemoAsyncCall();
a.ShowWebContent("http://www.googl.com");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment