title: C# Read webpage content Streamreader
body: <p>I need to read the content of a webpage in streamreader like</p>
  
  <blockquote>
    <p>www.example.com</p>
  </blockquote>
  
  <pre><code>&lt;test&gt;
  &lt;sample&gt;&lt;/sample&gt;
  &lt;/test&gt;
  </code></pre>
  
  <p>i got this:</p>
  
  <pre><code>System.IO.StreamReader StreamReader1 =
  new System.IO.StreamReader("www.example.com");
  string test = StreamReader1.ReadToEnd();
  </code></pre>
  
  <p>but i then i get this error code</p>
  
  <blockquote>
    <p>Attempt to access the method failed:
    System.IO.StreamReader..ctor(System.String)</p>
  </blockquote>