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.
What Import am I missing?
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.
What Import am I missing?
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.
http://msdn.microsoft.com/en-us/library/ms144200.aspx
as indicated here, it looks like the DownloadString
method is part of System.Net
.
Well, I think you're creating a Silverlight application. In that case it is a normal thing: you will find usually only asynchronous methods in Silverlight applications; this makes your UI more responsive because operations will be executed in another thread without blocking it.
Try to create a desktop application (Console Application, WPF, etc.) and you will find the method you're looking for.