Answer the question
In order to leave comments, you need to log in
How to remove async if not needed, but required?
Tipo I do not need asynchronous execution, but then I can not get html.
.Result causes a deadlock.
Because of async in general, everything becomes bad in other threads. There is no async method for getting html. What's the catch?
The code:
private async void GetHTMLFromWebBrowser()
{
html = await browser.GetSourceAsync(); // как без await жить?
}
Answer the question
In order to leave comments, you need to log in
Async.getAwaiter().getResult();
Where async is any asynchronous method
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question