IsolatedStorageFileStream.EndRead(IAsyncResult) 方法

定义

结束挂起的异步读取请求。

public:
 override int EndRead(IAsyncResult ^ asyncResult);
public override int EndRead (IAsyncResult asyncResult);
override this.EndRead : IAsyncResult -> int
Public Overrides Function EndRead (asyncResult As IAsyncResult) As Integer

参数

asyncResult
IAsyncResult

挂起的异步请求。

返回

Int32

从流中读取的字节数,介于零和所请求的字节数之间。 流仅在到达流的结尾处时才返回零。 否则,它们将一直被阻止到至少有一个字节可用时。

例外

asyncResultnull

注解

EndRead 必须在每个 IAsyncResult 对象 BeginRead上只调用一次,调用 EndRead 是知道从 Stream中读取的字节数的唯一方法。 EndRead 将在 I/O 操作完成之前阻止。

适用于