private void Button1_Click(object sender, EventArgs e)
{
string a = Get2().ConfigureAwait(false).GetAwaiter().GetResult();
richTextBox1.AppendText(a);
}
public async Task<string>Get2()
{
return await "https://raw.githubusercontent.com/SMAPPNYU/ProgrammerGroup/master/LargeDataSets/sample-tweet.raw.json".GetStringAsync().ConfigureAwait(false);
}
The first button click hangs for a moment then it works fine. why does the form freeze at the first time click the button?