Читати англійською Редагувати

Поділитися через


Installer.BeforeUninstall Event

Definition

Occurs before the installers in the Installers property perform their uninstall operations.

C#
public event System.Configuration.Install.InstallEventHandler BeforeUninstall;

Event Type

Examples

The following example demonstrates the BeforeUninstall event. It is raised by the OnBeforeUninstall method.

C#
// 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");
}

Applies to

Продукт Версії
.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

See also