FileSystemWatcher.OnError(ErrorEventArgs) 方法

定义

引发 Error 事件。Raises the Error event.

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

包含事件数据的 ErrorEventArgsAn ErrorEventArgs that contains the event data.

注解

OnError 发生错误时调用。OnError is called when an error occurs.

引发事件时,将通过委托调用事件处理程序。Raising an event invokes the event handler through a delegate. 有关详细信息,请参阅 处理和引发事件For more information, see Handling and Raising Events.

继承者说明

OnError(ErrorEventArgs) 在派生类中重写时,请确保调用基类的 OnError(ErrorEventArgs) 方法。When overriding OnError(ErrorEventArgs) in a derived class, be sure to call the base class's OnError(ErrorEventArgs) method.

适用于

另请参阅