Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BufferedStream::FlushAsync Method (CancellationToken)

.NET Framework (current version)
 

Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.

Namespace:   System.IO
Assembly:  mscorlib (in mscorlib.dll)

public:
virtual Task^ FlushAsync(
	CancellationToken cancellationToken
) override

Parameters

cancellationToken
Type: System.Threading::CancellationToken

The token to monitor for cancellation requests.

Return Value

Type: System.Threading.Tasks::Task^

A task that represents the asynchronous flush operation.

Exception Condition
ObjectDisposedException

The stream has been disposed.

.NET Framework
Available since 4.5
Return to top
Show:
© 2017 Microsoft