使用英语阅读

通过


FileSystemWatcher.OnError(ErrorEventArgs) 方法

定义

引发 Error 事件。

protected:
 void OnError(System::IO::ErrorEventArgs ^ e);
protected void OnError (System.IO.ErrorEventArgs e);
member this.OnError : System.IO.ErrorEventArgs -> unit
Protected Sub OnError (e As ErrorEventArgs)

参数

e
ErrorEventArgs

包含事件数据的 ErrorEventArgs

注解

OnError 在发生错误时调用 。

引发事件时,将通过委托调用事件处理程序。 有关详细信息,请参阅 处理和引发事件

继承者说明

在派生类中重写 OnError(ErrorEventArgs) 时,请务必调用基类的 OnError(ErrorEventArgs) 方法。

适用于

产品 版本
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

另请参阅