DownloadStringAsync wait for request completion

前端 未结 6 1389
感动是毒
感动是毒 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:04

    With Dot.Net 4.5:

     public static async void GetDataAsync()
            {           
                DoSomthing(await new WebClient().DownloadStringTaskAsync(MyURI));
            }
    

提交回复
热议问题