EndWrite Method
See Also 
SourceCode.IO Namespace > SizeLimitedStream Class : EndWrite Method



asyncResult
A reference to the outstanding asynchronous I/O request.

Glossary Item Box

Ends an asynchronous write operation. (Consider using System.IO.Stream.WriteAsync(System.Byte[],System.Int32,System.Int32) instead; see the Remarks section.)

Syntax

Visual Basic (Declaration) 
Public Overrides Sub EndWrite( _
   ByVal asyncResult As IAsyncResult _
) 
Visual Basic (Usage)Copy Code
Dim instance As SizeLimitedStream
Dim asyncResult As IAsyncResult
 
instance.EndWrite(asyncResult)
C# 
public override void EndWrite( 
   IAsyncResult asyncResult
)
C++/CLI 
public:
void EndWrite( 
   IAsyncResult^ asyncResult
) override 

Parameters

asyncResult
A reference to the outstanding asynchronous I/O request.

Exceptions

ExceptionDescription
System.ArgumentNullExceptionasyncResult is null.
System.ArgumentExceptionA handle to the pending write operation is not available.-or-The pending operation does not support writing.
System.InvalidOperationExceptionasyncResult did not originate from a System.IO.Stream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object) method on the current stream.
System.IO.IOExceptionThe stream is closed or an internal error has occurred.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also