FileStream.BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) メソッド

定義

非同期読み取り操作を開始します。 代わりに ReadAsync(Byte[], Int32, Int32, CancellationToken) を使用することを検討してください。

public:
 override IAsyncResult ^ BeginRead(cli::array <System::Byte> ^ array, int offset, int numBytes, AsyncCallback ^ userCallback, System::Object ^ stateObject);
public:
 override IAsyncResult ^ BeginRead(cli::array <System::Byte> ^ array, int offset, int numBytes, AsyncCallback ^ callback, System::Object ^ state);
public override IAsyncResult BeginRead(byte[] array, int offset, int numBytes, AsyncCallback userCallback, object stateObject);
public override IAsyncResult BeginRead(byte[] array, int offset, int numBytes, AsyncCallback callback, object state);
override this.BeginRead : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
override this.BeginRead : byte[] * int * int * AsyncCallback * obj -> IAsyncResult
Public Overrides Function BeginRead (array As Byte(), offset As Integer, numBytes As Integer, userCallback As AsyncCallback, stateObject As Object) As IAsyncResult
Public Overrides Function BeginRead (array As Byte(), offset As Integer, numBytes As Integer, callback As AsyncCallback, state As Object) As IAsyncResult

パラメーター

arraybuffer
Byte[]

データを読み取るバッファー。

offset
Int32

読み取りを開始する array 内のバイト オフセット。

numBytescount
Int32

読み取る最大バイト数。

callbackuserCallback
AsyncCallback

非同期読み取り操作が完了したときに呼び出されるメソッド。

statestateObject
Object

この特定の非同期読み取り要求を他の要求と区別するユーザー指定のオブジェクト。

返品

非同期読み取りを参照するオブジェクト。

例外

配列の長さから offset を引いた値は、 numBytes未満です。

arraynullです。

offset または numBytes が負の値です。

非同期読み取りがファイルの末尾を超えて試行されました。

適用対象