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

挂起的异步请求。

返回

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

例外

asyncResultnull

注解

EndRead 必须在中的每个 IAsyncResultBeginRead对象上恰好调用一次,调用 EndRead 是了解从 Stream读取的字节数的唯一方法。 EndRead 将阻止,直到 I/O 操作完成。

适用于