This class represents a response received from a WebRequest . A response consists of headers (stored as key/value pairs in the Headers property) and a response body. You can obtain the response body as a System.IO.Stream using the GetResponseStream( ) method. When you are finished with the response, call its Close( ) method; this releases any open resources still held by the WebResponse without having to wait for garbage collection to do so (which could take longer than desired). public abstract class WebResponse : MarshalByRefObject, System.Runtime.Serialization.ISerializable, IDisposable { // Protected Constructors protected WebResponse ( ); protected WebResponse (System.Runtime.Serialization.SerializationInfo serializationInfo , System.Runtime.Serialization.StreamingContext streamingContext ); // Public Instance Properties public virtual long ContentLength {set; get; } public virtual string ContentType {set; get; } public virtual WebHeaderCollection Headers {get; } public virtual Uri ResponseUri {get; } // Public Instance Methods public virtual void Close ( ); public virtual Stream GetResponseStream ( ); } HierarchySystem.Object System.MarshalByRefObject WebResponse(System.Runtime.Serialization.ISerializable, System.IDisposable) SubclassesFileWebResponse , HttpWebResponse Returned ByWebException.Response , WebRequest.{EndGetResponse( ) , GetResponse( )} Passed ToWebException.WebException( ) |