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) 方法。

適用於

另請參閱