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 必須在 的每個 IAsyncResult 物件 BeginRead上只呼叫一次,而呼叫 EndRead 是知道 從 Stream讀取位元組數的唯一方式。 EndRead 將會封鎖直到 I/O 作業完成為止。

適用於