Create a gist now

Instantly share code, notes, and snippets.

Embed
Don't block on async code.
public async void Button1_Click(...)
{
var json = await GetJsonAsync(...);
textBox1.Text = json;
}
public class MyController : ApiController
{
public async Task<string> Get()
{
var json = await GetJsonAsync(...);
return json.ToString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment