ServicedComponent.Deactivate Method ()

 

Called by the infrastructure when the object is about to be deactivated. Override this method to add custom finalization code to objects when just-in-time (JIT) compiled code or object pooling is used.

Namespace:   System.EnterpriseServices
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)

protected internal virtual void Deactivate()

The following code example demonstrates the use of this method.

protected override void Deactivate()
{
    MessageBox.Show("Bye Bye!");
}

.NET Framework
Available since 1.1
Return to top
Show: