I am trying to call CancelAsync, although webClient is out of scope.
private void Download_Click(object sender, EventArgs e)
{
WebClient webClient = new WebClient();
}
private void Button1_Click(object sender, EventArgs e)
{
webClient.CancelAsync();
}
Could someone show me how webClient.CancelAsync() could be called from this event handler please
1 Answer