FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object) FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object) FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object) FileStream.BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object) Method

Definition

Begins an asynchronous write operation. Consider using WriteAsync(Byte[], Int32, Int32, CancellationToken) instead.

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

Parameters

array
Byte[]

The buffer containing data to write to the current stream.

offset
Int32 Int32 Int32 Int32

The zero-based byte offset in array at which to begin copying bytes to the current stream.

numBytes
Int32 Int32 Int32 Int32

The maximum number of bytes to write.

callback
AsyncCallback AsyncCallback AsyncCallback AsyncCallback

The method to be called when the asynchronous write operation is completed.

state
Object Object Object Object

A user-provided object that distinguishes this particular asynchronous write request from other requests.

Returns

An object that references the asynchronous write.

Exceptions

array length minus offset is less than numBytes.

Applies to