.NET Web客户端:在哪里DownloadString? [英] .NET WebClient: Where is DownloadString?

查看:100
本文介绍了.NET Web客户端:在哪里DownloadString?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可能失去了一些东西,但是当我使用Web客户端,并查找DownloadString方法(如在一本书的例子中),我只看到DownloadStringAsync。

I'm probably missing something here, but when I use WebClient and look for the DownloadString method (as found in a book example), I only see DownloadStringAsync.

导入什么我错过?

推荐答案

您使用Silverlight?只有异步版本可以在Silverlight。否则,.NET框架4及以下(1.x的除外)有DownloadString()方法。

Are you using Silverlight? Only the Async version is available in Silverlight. Otherwise, the .NET 4 Framework and below (except 1.x) have the DownloadString() method.

<一个href="http://msdn.microsoft.com/en-us/library/ms144200.aspx">http://msdn.microsoft.com/en-us/library/ms144200.aspx

这篇关于.NET Web客户端:在哪里DownloadString?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆