Information
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
[C#]
public override int EndRead(
 IAsyncResult asyncResult
);
[C++]
public: int EndRead(
 IAsyncResult* asyncResult
);
[JScript]
public override function EndRead(
   asyncResult : IAsyncResult
) : int;

Parameters

asyncResult
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.

Exceptions

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

Remarks

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.

Requirements

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

Show:
© 2014 Microsoft