草庐IT

DownloadDataAsync

全部标签

c# - 如何在此上下文中使用 WebClient.DownloadDataAsync() 方法?

我的计划是让用户在我的程序中写下电影标题,我的程序将异步提取适当的信息,这样UI就不会卡住。代码如下:publicclassIMDB{WebClientWebClientX=newWebClient();byte[]Buffer=null;publicstring[]SearchForMovie(stringSearchParameter){//FormatthesearchparametersoitformsavalidIMDB*SEARCH*url.//Fromwithinthesearchwebsitewe'regoingtopulltheactualmovie//link.st