Begins an asynchronous write.
[Visual Basic] Overridable Public Function BeginWrite( _ ByVal buffer() As Byte, _ ByVal offset As Integer, _ ByVal count As Integer, _ ByVal callback As AsyncCallback, _ ByVal state As Object _ ) As IAsyncResult [C#] public virtual IAsyncResult BeginWrite( byte[] buffer, int offset, int count, AsyncCallback callback, object state ); [C++] public: virtual IAsyncResult* BeginWrite( unsigned char* buffer[], int offset, int count, AsyncCallback* callback, Object* state ); [JScript] public function BeginWrite( buffer : Byte[], offset : int, count : int, callback : AsyncCallback, state : Object ) : IAsyncResult;
An IAsyncResult that represents the asynchronous read, which is quite possibly still pending.
Exception Type | Condition |
---|---|
IOException | An asynchronous write was attempted past the end of the file. |
The current position in the stream is updated when you issue the asynchronous read or write, not when the IO operation completes.
You must call EndWrite with this IAsyncResult to find out how many bytes were written.