How to: Request a Web Page and Retrieve the Results as a Stream

This example shows how to request a Web page and retrieve the results in a stream.


var myClient = new WebClient();
Stream response = myClient.OpenRead("");
// The stream data is used here.
Dim myClient As New WebClient()
Dim response As Stream = myClient.OpenRead("")
' The stream data is used here.

Compiling the Code

This example requires:

See also