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

매개 변수

arraybuffer
Byte[]

데이터를 읽어올 버퍼입니다.

offset
Int32

읽기를 시작할 array의 바이트 오프셋입니다.

numBytescount
Int32

읽을 최대 바이트 수입니다.

callbackuserCallback
AsyncCallback

비동기 읽기 작업이 완료되면 호출될 메서드입니다.

statestateObject
Object

다른 요청에서 특정 비동기 읽기 요청을 구별하는 사용자 제공 개체입니다.

반환

비동기 읽기를 참조하는 개체입니다.

예외

배열 길이에서 offset을 빼면 numBytes보다 작습니다.

array이(가) null인 경우

offset 또는 numBytes가 음수입니다.

파일의 끝을 지나 비동기 읽기를 시도했습니다.

적용 대상