System.Net.FileWebRequest.EndGetRequestStream Method

Ends an asynchronous request for a System.IO.Stream instance that the application uses to write data.

Syntax

public override System.IO.Stream EndGetRequestStream (IAsyncResult asyncResult)

Parameters

asyncResult
An IAsyncResult that references the pending request for a stream.

Returns

A System.IO.Stream object that the application uses to write data.

Remarks

The FileWebRequest.EndGetRequestStream(IAsyncResult) method completes an asynchronous stream request that was started by the FileWebRequest.BeginGetRequestStream(AsyncCallback, object) method.

Note:

To avoid timing issues with garbage collection, be sure to close the response stream by calling the System.IO.Stream.Close method on the stream returned by the FileWebResponse.GetResponseStream method after calling the FileWebRequest.EndGetResponse(IAsyncResult) method.

Requirements

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