語言

ZLibStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) 方法

定義

開始異步讀取作業。

public:
 override IAsyncResult ^ BeginRead(cli::array <System::Byte> ^ buffer, int offset, int count, AsyncCallback ^ asyncCallback, System::Object ^ asyncState);
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback? asyncCallback, object? asyncState);
override this.BeginRead : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
Public Overrides Function BeginRead (buffer As Byte(), offset As Integer, count As Integer, asyncCallback As AsyncCallback, asyncState As Object) As IAsyncResult

參數

buffer
Byte[]

用來讀取資料的位元組陣列。

offset
Int32

從串流開始讀取資料的位元組偏移 buffer 量。

count
Int32

最大可讀取的位元組數。

asyncCallback
AsyncCallback

一個可選的非同步回撥,讀取操作完成後可呼叫。

asyncState
Object

一個使用者提供的物件,用來區分此特定非同步讀取請求與其他請求。

傳回

一個代表非同步讀取操作的物件,該操作可能仍在待處理中。

例外狀況

buffer 是 null。

offset 小於零。

-或-

offset 並且 count 被陣列限制在外。

-或-

count 大於從 offset 到 末 buffer端的元素數。

適用於