Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IsolatedStorageFileStream.EndRead Method

Ends a pending asynchronous read request.

[Visual Basic]
Overrides Public Function EndRead( _
   ByVal asyncResult As IAsyncResult _
) As Integer
public override int EndRead(
 IAsyncResult asyncResult
public: int EndRead(
 IAsyncResult* asyncResult
public override function EndRead(
   asyncResult : IAsyncResult
) : int;


The pending asynchronous request.

Return Value

The number of bytes read from the stream, between zero and the number of requested bytes. Streams will only return zero at the end of the stream. Otherwise, they will block until at least one byte is available.


Exception Type Condition
ArgumentNullException The asyncResult is a null reference (Nothing in Visual Basic).


EndRead must be called exactly once on every IAsyncResult from BeginRead, and calling EndRead is the only way to know how many bytes were read from the Stream. EndRead will block until the I/O operation has completed.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

IsolatedStorageFileStream Class | IsolatedStorageFileStream Members | System.IO.IsolatedStorage Namespace

© 2017 Microsoft