MemoryStream: EndRead

EndRead

Signifies the end of an asynchronous read from the stream.



 Public Function EndRead(
	  ByVal AsyncResult As IAsyncResult ) As Long

Parameters

AsyncResult
[ByVal] IAsyncResult. The IAsyncResult object returned from the BeginRead function.

Return Values

Long -  The number of bytes read from the stream in to Buffer in the BeginRead method.

Remarks

This method is generally called anytime after BeginRead for a MemoryStream. Since the MemoryStream uses memory for the data store, there is no need to wait for the data to arrive. The BeginRead/EndRead calls are redundant and should not be used with the MemoryStream. Instead use the ReadBlock Method.

If any exceptions were caused during the reading then they will be thrown during the call to EndRead.

See Also

Project CorLib Overview

Class MemoryStream Overview