传递参数DownloadStringCompletedEventHandler在C# [英] passing parameter to DownloadStringCompletedEventHandler in C#
本文介绍了传递参数DownloadStringCompletedEventHandler在C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我工作在WP7应用程序,我想传递一个列表框作为参数传递给client_DownloadStringCompleted方法。
我的代码看起来像下面,
Web客户端的客户端=新的Web客户端();
client.DownloadStringCompleted + =新DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
解决方案
只是这行添加到您的代码:
client.DownloadStringAsync(yourUri,yourListBox);
i am working on application in WP7 , i would like to pass a list box as parameter to client_DownloadStringCompleted method.
My code looks like below ,
WebClient client = new WebClient();
client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
解决方案
Just add this line to your code:
client.DownloadStringAsync(yourUri, yourListBox);
这篇关于传递参数DownloadStringCompletedEventHandler在C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文