Visual Basic (Declaration) | |
---|---|
Public Sub Dispose() |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public void Dispose() |
Calling Dispose() on the Document object disposes of all objects contained in that Document object. Therefore, it is necessary to remove any items which will still need to be used prior to calling the Dispose() method. Similarly, to obtain access to any Pages in the Document object's Pages collection, those Pages need to be removed from the Pages collection prior to calling the Dispose() method of the Document object.