FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object) 메서드

정의

비동기 쓰기 작업을 시작합니다. 대신 WriteAsync(Byte[], Int32, Int32, CancellationToken)을 사용하는 것이 좋습니다.

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

매개 변수

arraybuffer
Byte[]

현재 스트림에 쓸 데이터를 포함하는 버퍼입니다.

offset
Int32

현재 스트림으로 바이트를 복사하기 시작할 array의 바이트 오프셋(0부터 시작)입니다.

numBytescount
Int32

쓸 최대 바이트 수입니다.

callbackuserCallback
AsyncCallback

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

statestateObject
Object

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

반환

IAsyncResult

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

예외

array 길이에서 offset을 뺀 값이 numBytes보다 작습니다.

array이(가) null인 경우

offset 또는 numBytes가 음수입니다.

스트림이 쓰기를 지원하지 않습니다.

스트림이 닫혔습니다.

I/O 오류가 발생했습니다.

적용 대상