I need to read the content of a webpage in streamreader like
www.example.com
<test>
<sample></sample>
</test>
i got this:
System.IO.StreamReader StreamReader1 =
new System.IO.StreamReader("www.example.com");
string test = StreamReader1.ReadToEnd();
but i then i get this error code
Attempt to access the method failed: System.IO.StreamReader..ctor(System.String)
Try a WebClient, it's easier and you don't have to worry about streams and rivers:
using (var client = new WebClient())
{
string result = client.DownloadString("http://www.example.com");
// TODO: do something with the downloaded result from the remote
// web site
}