CustomTaskPane.Dispose Method

Releases all resources used by the CustomTaskPane.

Namespace:  Microsoft.Office.Tools
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)

Syntax

'Declaration
Public Sub Dispose
'Usage
Dim instance As CustomTaskPane

instance.Dispose()
public void Dispose()

Implements

IDisposable.Dispose()

Remarks

Call Dispose when you are finished using the CustomTaskPane. The Dispose method leaves the CustomTaskPane in an unusable state. After calling Dispose, you must release all references to the CustomTaskPane so the garbage collector can reclaim the memory that the CustomTaskPane was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

Typically, you should not call the Dispose method directly in your code. Instead, when you are finished using the CustomTaskPane, call the Remove or RemoveAt method to remove it from the CustomTaskPaneCollection in your add-in. These methods call the Dispose method of the CustomTaskPane that you are removing.

.NET Framework Security

See Also

Reference

CustomTaskPane Class

CustomTaskPane Members

Microsoft.Office.Tools Namespace