In a winform, clicking on a button calls this method to download link content as string and then displays string length in a textbox. This all happens asynchronously. Is there a way to do this synchronously?
You can make any task block by just taking the
string response = client.GetStringAsync(...).Result;
However if this is running on a UI thread you should not do that. Blocking on the UI thread is not nice. Embrace the asynchronicity.