System.Net.WebResponse.GetResponseStream Method

When overridden in a descendant class, returns the data stream from the Internet resource.

Syntax

public virtual System.IO.Stream GetResponseStream ()

Returns

An instance of the System.IO.Stream class for reading data from the Internet resource.

Exceptions

TypeReason
NotSupportedExceptionThis method is not implemented in the derived class.

Remarks

The WebResponse.GetResponseStream method returns the data stream from the Internet resource.

Note:

The response stream must be closed to avoid running out of system resources. The response stream can be closed by calling System.IO.Stream.Close or WebResponse.Close

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0