StreamWriter.FlushAsync 方法

定义

异步清除此流的所有缓冲区,并导致任何缓冲数据写入基础设备。

public:
 override System::Threading::Tasks::Task ^ FlushAsync();
public override System.Threading.Tasks.Task FlushAsync();
[System.Runtime.InteropServices.ComVisible(false)]
public override System.Threading.Tasks.Task FlushAsync();
override this.FlushAsync : unit -> System.Threading.Tasks.Task
[<System.Runtime.InteropServices.ComVisible(false)>]
override this.FlushAsync : unit -> System.Threading.Tasks.Task
Public Overrides Function FlushAsync () As Task

返回

表示异步刷新操作的任务。

属性

例外

流已释放。

注解

此方法存储在任务中,它返回该方法的同步对应项可以引发的所有非使用异常。 如果异常存储在返回的任务中,则等待任务时将引发该异常。 使用情况异常(例如 ArgumentException)仍会同步引发。 有关存储的异常,请参阅由 Flush()..

适用于