次の方法で共有


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.

使用例

WebClient myClient = new WebClient();
Stream response = myClient.OpenRead("https://www.contoso.com/index.htm");
// The stream data is used here.
response.Close();
Dim myClient As WebClient = New WebClient()
Dim response As Stream = myClient.OpenRead("https://www.contoso.com/index.htm")
' The stream data is used here.
response.Close()

コードのコンパイル

This example requires:

参照

概念

Requesting Data