OnBeginShutdown Method
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

IDTExtensibility2.OnBeginShutdown Method

Occurs whenever the Visual Studio integrated development environment (IDE) shuts down while an add-in is running.

Namespace:  Extensibility
Assembly:  Extensibility (in Extensibility.dll)

void OnBeginShutdown(
	ref Array custom
)

Parameters

custom
Type: System.Array%

An empty array that you can use to pass host-specific data for use in the add-in.

Although a shutdown of Visual Studio might be canceled, the OnBeginShutdown method cannot be canceled. As a result, add-ins should assume that all shutdown events occur and perform any cleanup routines accordingly.

This method can be used to store the settings of the add-in at the time that Visual Studio shuts down so that it can be restored later to its original state.

public void OnBeginShutdown(ref Array custom)
{
    // Place cleanup code here.
    System.Windows.Forms.MessageBox.Show("Shutting down Visual 
    Studio");
}

Show:
© 2016 Microsoft