다음을 통해 공유


Installer.BeforeUninstall 이벤트

정의

Installers 속성의 설치 관리자가 제거 작업을 수행하기 전에 발생합니다.

public:
 event System::Configuration::Install::InstallEventHandler ^ BeforeUninstall;
public event System.Configuration.Install.InstallEventHandler BeforeUninstall;
member this.BeforeUninstall : System.Configuration.Install.InstallEventHandler 
Public Custom Event BeforeUninstall As InstallEventHandler 

이벤트 유형

예제

다음 예제에서는 이벤트를 보여 줍니다 BeforeUninstall . 메서드에 의해 발생합니다 OnBeforeUninstall .

   // MyInstaller is derived from the class 'Installer'.
private:
   MyInstaller()
   {
      BeforeUninstall += gcnew InstallEventHandler( this, &MyInstaller::BeforeUninstallEventHandler );
   }

   void BeforeUninstallEventHandler( Object^ sender, InstallEventArgs^ e )
   {
      // Add steps to perform any actions before the Uninstall process.
      Console::WriteLine( "Code for BeforeUninstallEventHandler" );
   }
// MyInstaller is derived from the class 'Installer'.
MyInstaller() : base()
{
   BeforeUninstall += new InstallEventHandler(BeforeUninstallEventHandler);
}
private void BeforeUninstallEventHandler(object sender, InstallEventArgs e)
{
   // Add steps to perform any actions before the Uninstall process.
   Console.WriteLine("Code for BeforeUninstallEventHandler");
}
' MyInstaller is derived from the class 'Installer'.
Sub New()
   MyBase.New()
   AddHandler BeforeUninstall, AddressOf BeforeUninstallEventHandler
End Sub

Private Sub BeforeUninstallEventHandler(sender As Object, e As InstallEventArgs)
   ' Add steps to perform any actions before the Uninstall process.
   Console.WriteLine("Code for BeforeUninstallEventHandler")
End Sub

적용 대상

추가 정보