DownloadStringAsync wait for request completion

前端 未结 6 1367
感动是毒
感动是毒 2020-12-10 13:41

I am using this code to retrieve an url content:

private ArrayList request(string query)
{
    ArrayList parsed_output = new ArrayList();

    string url = s         


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-10 14:16

    You really want to WAIT for an async method to complete after you launch it, in the same thread? Why not just use the sync version then.

    You should hook up the DownloadStringCompleted event and catch the result there. Then you can use it as a real Async method.

提交回复
热议问题